Skip to content

Commit

Permalink
Added targets for OSX M1 and Linux arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
lkarlslund committed Dec 15, 2021
1 parent 2e5fa20 commit 500ba64
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ go build -ldflags "%LDFLAGS%" -o adalanche-osx-x64-%VERSION% ./adalanche
set GOOS=linux
go build -ldflags "%LDFLAGS%" -o adalanche-linux-x64-%VERSION% ./adalanche

set GOARCH=arm64
set GOOS=linux
go build -ldflags "%LDFLAGS%" -o adalanche-linux-arm64-%VERSION% ./adalanche
set GOOS=darwin
go build -ldflags "%LDFLAGS%" -o adalanche-osx-m1-%VERSION% ./adalanche

set LDFLAGS=-X github.com/lkarlslund/adalanche/modules/version.Program=adalanche-collector -X github.com/lkarlslund/adalanche/modules/version.Builddate=%BUILDDATE% -X github.com/lkarlslund/adalanche/modules/version.Commit=%COMMIT% -X github.com/lkarlslund/adalanche/modules/version.Version=%VERSION%
set GOARCH=386
set GOOS=windows
go build -ldflags "%LDFLAGS%" -o adalanche-collector-windows-386-%VERSION%.exe ./collector

2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ LDFLAGS="-X github.com/lkarlslund/adalanche/modules/version.Program=adalanche -X

GOOS=windows GOARCH=amd64 go build -ldflags "$LDFLAGS" -o adalanche-windows-x64-$VERSION.exe ./adalanche || EXIT_STATUS=$?
GOOS=darwin GOARCH=amd64 go build -ldflags "$LDFLAGS" -o adalanche-osx-x64-$VERSION ./adalanche || EXIT_STATUS=$?
GOOS=darwin GOARCH=arm64 go build -ldflags "$LDFLAGS" -o adalanche-osx-m1-$VERSION ./adalanche || EXIT_STATUS=$?
GOOS=linux GOARCH=amd64 go build -ldflags "$LDFLAGS" -o adalanche-linux-x64-$VERSION ./adalanche || EXIT_STATUS=$?
GOOS=linux GOARCH=arm64 go build -ldflags "$LDFLAGS" -o adalanche-linux-arm64-$VERSION ./adalanche || EXIT_STATUS=$?

LDFLAGS="-X github.com/lkarlslund/adalanche/modules/version.Program=adalanche-collector -X github.com/lkarlslund/adalanche/modules/version.Builddate=$BUILDDATE -X github.com/lkarlslund/adalanche/modules/version.Commit=$COMMIT -X github.com/lkarlslund/adalanche/modules/version.Version=$VERSION"

Expand Down

0 comments on commit 500ba64

Please sign in to comment.