Skip to content

Commit

Permalink
fixed: drop support for building darwin/386 and darwin/arm binaries, …
Browse files Browse the repository at this point in the history
…since

they are not supported anymore for go 1.15+. Fix build script not stopping
on errors.
  • Loading branch information
Abathargh committed Jul 13, 2024
1 parent cce25b5 commit 010465e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions scripts/build-standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,26 @@
version=$(git describe --tags)
vers_nov=${version#*v}

target_archs=(386 amd64 arm64)
target_archs=(386 amd64 arm arm64)
target_oss=(linux darwin windows)

mkdir -p dist

for os in "${target_oss[@]}"; do
for arch in "${target_archs[@]}"; do
GOARCH="$arch" GOOS="$os" make build
if [ "$os" = "darwin" ]; then
if [ "$arch" = "386" ] || [ "$arch" = "arm" ]; then
# darwin/386 and darwin/arm support has been dropped since go1.15
continue
fi
fi
GOARCH="$arch" GOOS="$os" make build || exit 1
arname="harlock_${vers_nov}_${os}_${arch}"
if [ "$os" = "windows" ]; then
zip "$arname".zip README.md LICENSE harlock.exe
zip "$arname".zip README.md LICENSE harlock.exe || exit 1
mv "$arname.zip" dist/
else
tar -czvf "$arname".tar.gz README.md LICENSE harlock
tar -czvf "$arname".tar.gz README.md LICENSE harlock || exit 1
mv "$arname.tar.gz" dist/
fi
done
Expand Down

0 comments on commit 010465e

Please sign in to comment.