Add binaries for arm64 architectures

This commit is contained in:
jecepeda 2022-03-11 14:10:58 +01:00
parent e15166ecb9
commit df6443bb61

View File

@ -23,17 +23,17 @@ function build {
exit 1 exit 1
fi fi
echo "Building ${osname} binary" echo "Building ${osname}-${GOARCH} binary"
export GOOS export GOOS
export GOARCH export GOARCH
go build -ldflags "$ldflags" -o $buildpath/$target go/cmd/gh-ost/main.go go build -ldflags "$ldflags" -o $buildpath/$target go/cmd/gh-ost/main.go
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Build failed for ${osname}" echo "Build failed for ${osname} ${GOARCH}."
exit 1 exit 1
fi fi
(cd $buildpath && tar cfz ./gh-ost-binary-${osshort}-${timestamp}.tar.gz $target) (cd $buildpath && tar cfz ./gh-ost-binary-${osshort}-${GOARCH}-${timestamp}.tar.gz $target)
if [ "$GOOS" == "linux" ] ; then if [ "$GOOS" == "linux" ] ; then
echo "Creating Distro full packages" echo "Creating Distro full packages"
@ -63,7 +63,9 @@ main() {
mkdir -p ${buildpath} mkdir -p ${buildpath}
rm -rf ${buildpath:?}/* rm -rf ${buildpath:?}/*
build GNU/Linux linux linux amd64 build GNU/Linux linux linux amd64
build GNU/Linux linux linux arm64
build macOS osx darwin amd64 build macOS osx darwin amd64
build macOS osx darwin arm64
echo "Binaries found in:" echo "Binaries found in:"
find $buildpath/gh-ost* -type f -maxdepth 1 find $buildpath/gh-ost* -type f -maxdepth 1