1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

refactor(api): refactor base import path (#2788)

* refactor(api): refactor base import path

* fix(build-system): update build_binary_devops

* fix(build-system): fix build_binary_devops for linux

* fix(build-system): fix build_binary_devops for Windows
This commit is contained in:
Anthony Lapenna 2019-03-21 14:20:14 +13:00 committed by GitHub
parent 0c7d69eb17
commit 14845a4a53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
184 changed files with 372 additions and 373 deletions

View file

@ -11,10 +11,9 @@ $go_path = "$($(Get-ITEM -Path env:AGENT_HOMEDIRECTORY).Value)\go"
Set-Item env:GOPATH "$go_path"
New-Item -Name dist -Path "." -ItemType Directory | Out-Null
New-Item -Name portainer -Path "$go_path\src\github.com\" -ItemType Directory | Out-Null
New-Item -Name portainer -Path "$go_path\src\github.com\portainer" -ItemType Directory | Out-Null
Copy-Item -Path "api" -Destination "$go_path\src\github.com\portainer" -Recurse -Force -ErrorAction:SilentlyContinue
Rename-Item -Path "$go_path\src\github.com\portainer\api" -NewName "portainer" -ErrorAction:SilentlyContinue
Copy-Item -Path "api" -Destination "$go_path\src\github.com\portainer\portainer\api" -Recurse -Force -ErrorAction:SilentlyContinue
Set-Location -Path "api\cmd\portainer"

View file

@ -1,11 +1,11 @@
export GOPATH="$BUILD_SOURCESDIRECTORY/api"
export GOPATH="/tmp/go"
binary="portainer"
mkdir -p dist
mkdir -p api/src/github.com/portainer/
mkdir -p ${GOPATH}/src/github.com/portainer/portainer
cp -R api/ api/src/github.com/portainer/portainer/
cp -R api ${GOPATH}/src/github.com/portainer/portainer/api
cd 'api/cmd/portainer'