-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from open-amt-cloud-toolkit/alpha
chore: update main from alpha
- Loading branch information
Showing
12 changed files
with
116 additions
and
125 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
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,29 @@ | ||
# Get version from the first argument | ||
version=$1 | ||
|
||
docker build -t vprodemo.azurecr.io/console:v$version . | ||
|
||
# Build for Linux | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w -X 'github.com/open-amt-cloud-toolkit/console/internal/app.Version=$version'" -trimpath -o console_linux_x64 ./cmd/app/main.go | ||
|
||
# Build for Windows | ||
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w -X 'github.com/open-amt-cloud-toolkit/console/internal/app.Version=$version'" -trimpath -o console_windows_x64.exe ./cmd/app/main.go | ||
|
||
# Build for Mac (x64) | ||
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w -X 'github.com/open-amt-cloud-toolkit/console/internal/app.Version=$version'" -trimpath -o console_mac_x64 ./cmd/app/main.go | ||
|
||
# Build for Mac (arm64) | ||
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w -X 'github.com/open-amt-cloud-toolkit/console/internal/app.Version=$version'" -trimpath -o console_mac_arm64 ./cmd/app/main.go | ||
|
||
# Mark the Unix system outputs as executable | ||
chmod +x console_linux_x64 | ||
chmod +x console_mac_x64 | ||
chmod +x console_mac_arm64 | ||
|
||
# Add them to tar files respectively | ||
tar cvfpz console_linux_x64.tar.gz console_linux_x64 | ||
tar cvfpz console_mac_x64.tar.gz console_mac_x64 | ||
tar cvfpz console_mac_arm64.tar.gz console_mac_arm64 | ||
|
||
# Add Windows build to a zip file | ||
zip console_windows_x64.zip console_windows_x64.exe |
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
Oops, something went wrong.