fix: ci dist tar

This commit is contained in:
henry.chen
2025-07-17 15:37:30 +08:00
parent 23e35dcefa
commit 24bfe528b2
2 changed files with 3 additions and 7 deletions

View File

@@ -11,11 +11,7 @@ for file in cmd/*; do
for os in linux darwin windows; do
_target="$app-$_tag.$os-$_arch.tar.gz"
GOOS=$os GOARCH=$_arch \
go build -tags prod -ldflags '-extldflags "-static"' -o backend "./cmd/$app"
if [ "$app" = "eiblog" ]; then
tar czf $_target conf website assets backend
else
tar czf $_target conf backend
fi
go build -ldflags '-extldflags "-static"' -o ./cmd/$app/backend ./cmd/$app
tar czf $_target ./cmd/$app/etc ./cmd/$app/backend
done
done

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env sh
go build -tags prod -ldflags '-extldflags "-static"' -o "./cmd/$1/backend" "./cmd/$1"
go build -ldflags '-extldflags "-static"' -o ./cmd/$1/backend ./cmd/$1