mirror of
https://github.com/khairul169/garage-webui.git
synced 2026-09-15 00:43:21 +07:00
chore: add single executable release build
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
BINARY=garage-webui
|
||||
VERSION=$(cat package.json | grep \"version\" | cut -d'"' -f 4)
|
||||
PLATFORMS="linux"
|
||||
ARCHITECTURES="386 amd64 arm arm64"
|
||||
|
||||
echo "Building version $VERSION"
|
||||
|
||||
cd backend && rm -rf dist && mkdir -p dist && cp -r ../dist ./ui/dist
|
||||
|
||||
for PLATFORM in $PLATFORMS; do
|
||||
for ARCH in $ARCHITECTURES; do
|
||||
echo "Building $PLATFORM-$ARCH"
|
||||
|
||||
GOOS=$PLATFORM GOARCH=$ARCH go build -o "dist/$BINARY-v$VERSION-$PLATFORM-$ARCH" -tags="prod" main.go
|
||||
done
|
||||
done
|
||||
Reference in New Issue
Block a user