forked from portainer/portainer
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build-system): fix local build system after appveyor introduction (…
- Loading branch information
1 parent
6597970
commit 79c24ce
Showing
12 changed files
with
106 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
export GOPATH="$APPVEYOR_BUILD_FOLDER/api" | ||
binary="portainer" | ||
|
||
mkdir -p dist | ||
mkdir -p api/src/github.com/portainer/ | ||
|
||
cp -R api/ api/src/github.com/portainer/portainer/ | ||
|
||
cd 'api/cmd/portainer' | ||
|
||
go get -t -d -v ./... | ||
GOOS=$1 GOARCH=$2 CGO_ENABLED=0 go build -a --installsuffix cgo --ldflags '-s' | ||
|
||
mv "$APPVEYOR_BUILD_FOLDER/api/cmd/portainer/$binary" "$APPVEYOR_BUILD_FOLDER/dist/portainer" | ||
mv "${binary}" "../../../dist/portainer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
param ( | ||
[string]$platform, | ||
[string]$arch | ||
) | ||
|
||
$ErrorActionPreference = "Stop"; | ||
|
||
$binary = "portainer.exe" | ||
$project_path = (Get-ITEM -Path env:APPVEYOR_BUILD_FOLDER).Value | ||
|
||
Set-Item env:GOPATH "$project_path\api" | ||
|
||
New-Item -Name dist -Path "$project_path" -ItemType Directory | Out-Null | ||
New-Item -Name portainer -Path "$project_path\api\src\github.com\" -ItemType Directory | Out-Null | ||
|
||
Copy-Item -Path "$project_path\api" -Destination "$project_path\api\src\github.com\portainer" -Recurse -Force -ErrorAction:SilentlyContinue | ||
Rename-Item -Path "$project_path\api\src\github.com\portainer\api" -NewName "portainer" -ErrorAction:SilentlyContinue | ||
|
||
Set-Location -Path "$project_path\api\cmd\portainer" | ||
|
||
C:\go\bin\go.exe get -t -d -v ./... | ||
C:\go\bin\go.exe build -v | ||
|
||
Move-Item -Path "$project_path\api\cmd\portainer\$($binary)" -Destination "$project_path\dist" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export GOPATH="$APPVEYOR_BUILD_FOLDER/api" | ||
binary="portainer" | ||
|
||
mkdir -p dist | ||
mkdir -p api/src/github.com/portainer/ | ||
|
||
cp -R api/ api/src/github.com/portainer/portainer/ | ||
|
||
cd 'api/cmd/portainer' | ||
|
||
go get -t -d -v ./... | ||
GOOS=$1 GOARCH=$2 CGO_ENABLED=0 go build -a --installsuffix cgo --ldflags '-s' | ||
|
||
mv "$APPVEYOR_BUILD_FOLDER/api/cmd/portainer/$binary" "$APPVEYOR_BUILD_FOLDER/dist/portainer" |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters