mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-03 11:30:28 -05:00
go/utils/publishrelease,.github: Publish darwin-arm64 releases and make them work with install.sh.
This commit is contained in:
@@ -13,29 +13,29 @@ set -e
|
||||
set -o pipefail
|
||||
apt-get update && apt-get install -y zip
|
||||
cd /src
|
||||
BINS="dolt git-dolt git-dolt-smudge"
|
||||
OSES="windows linux darwin"
|
||||
ARCHS="amd64 arm64"
|
||||
|
||||
for os in $OSES; do
|
||||
for arch in $ARCHS; do
|
||||
o="out/dolt-$os-$arch"
|
||||
mkdir -p "$o/bin"
|
||||
cp Godeps/LICENSES "$o/"
|
||||
for bin in $BINS; do
|
||||
echo Building "$o/$bin"
|
||||
obin="$bin"
|
||||
if [ "$os" = windows ]; then
|
||||
obin="$bin.exe"
|
||||
fi
|
||||
CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" go build -o "$o/bin/$obin" "./cmd/$bin/"
|
||||
done
|
||||
BINS="dolt git-dolt git-dolt-smudge"
|
||||
OS_ARCH_TUPLES="windows-amd64 linux-amd64 darwin-amd64 darwin-arm64"
|
||||
|
||||
for tuple in $OS_ARCH_TUPLES; do
|
||||
os=`echo $tuple | sed 's/-.*//'`
|
||||
arch=`echo $tuple | sed 's/.*-//'`
|
||||
o="out/dolt-$os-$arch"
|
||||
mkdir -p "$o/bin"
|
||||
cp Godeps/LICENSES "$o/"
|
||||
for bin in $BINS; do
|
||||
echo Building "$o/$bin"
|
||||
obin="$bin"
|
||||
if [ "$os" = windows ]; then
|
||||
(cd out && zip -r "dolt-$os-$arch" "dolt-$os-$arch")
|
||||
else
|
||||
tar czf "out/dolt-$os-$arch.tar.gz" -C out "dolt-$os-$arch"
|
||||
obin="$bin.exe"
|
||||
fi
|
||||
CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" go build -o "$o/bin/$obin" "./cmd/$bin/"
|
||||
done
|
||||
if [ "$os" = windows ]; then
|
||||
(cd out && zip -r "dolt-$os-$arch" "dolt-$os-$arch")
|
||||
else
|
||||
tar czf "out/dolt-$os-$arch.tar.gz" -C out "dolt-$os-$arch"
|
||||
fi
|
||||
done
|
||||
|
||||
render_install_sh() {
|
||||
|
||||
@@ -51,7 +51,8 @@ assert_linux_or_macos() {
|
||||
if [ "$OS" != Linux -a "$OS" != Darwin ]; then
|
||||
fail "E_UNSUPPORTED_OS" "dolt install.sh only supports macOS and Linux."
|
||||
fi
|
||||
if [ "$ARCH" != x86_64 -a "$ARCH" != i386 -a "$ARCH" != i686 -a "$ARCH-$OS" != arm64-Darwin ]; then
|
||||
|
||||
if [ "$ARCH-$OS" != "x86_64-Linux" -a "$ARCH-$OS" != "x86_64-Darwin" -a "$ARCH-$OS" != "arm64-Darwin" ]; then
|
||||
fail "E_UNSUPPOSED_ARCH" "dolt install.sh only supports installing dolt on x86_64 or x86 or Darwin-arm64."
|
||||
fi
|
||||
|
||||
@@ -62,10 +63,8 @@ assert_linux_or_macos() {
|
||||
fi
|
||||
if [ "$ARCH" == x86_64 ]; then
|
||||
PLATFORM_TUPLE=$PLATFORM_TUPLE-amd64
|
||||
elif [ "$ARCH" == arm64 -a "$OS" == Darwin ]; then
|
||||
PLATFORM_TUPLE=$PLATFORM_TUPLE-amd64
|
||||
else
|
||||
PLATFORM_TUPLE=$PLATFORM_TUPLE-386
|
||||
elif [ "$ARCH" == arm64 ]; then
|
||||
PLATFORM_TUPLE=$PLATFORM_TUPLE-arm64
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user