chore: add release script

pull/45/head v0.2.0-alpha.1
Unlock Music Dev 2 years ago
parent 3794ff3154
commit 62548955dc
No known key found for this signature in database
GPG Key ID: 95202E10D3413A1D

2
.gitignore vendored

@ -1 +1,3 @@
.idea
/dist

@ -0,0 +1,32 @@
#!/bin/bash
set -e
PLATFORMS=(
"linux/amd64"
"linux/arm64"
"darwin/amd64"
"darwin/arm64"
"windows/amd64"
"windows/386"
)
DEST_DIR=${DEST_DIR:-"dist"}
for PLATFORM in "${PLATFORMS[@]}"; do
GOOS=${PLATFORM%/*}
GOARCH=${PLATFORM#*/}
echo "Building for $GOOS/$GOARCH"
FILENAME="um-$GOOS-$GOARCH"
if [ "$GOOS" = "windows" ]; then
FILENAME="$FILENAME.exe"
fi
GOOS=$GOOS GOARCH=$GOARCH go build -v \
-o "${DEST_DIR}/${FILENAME}" \
-ldflags "-s -w -X main.AppVersion=$(git describe --tags --always --dirty)" \
./cmd/um
done
cd "$DEST_DIR"
sha256sum um-* > sha256sums.txt
Loading…
Cancel
Save