mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-23 06:32:28 +08:00
fix: tar file
This commit is contained in:
@@ -5,23 +5,17 @@ set -e
|
|||||||
_tag="$1"
|
_tag="$1"
|
||||||
_arch=$(go env GOARCH)
|
_arch=$(go env GOARCH)
|
||||||
|
|
||||||
# prepare dir ./bin
|
|
||||||
mkdir -p ./bin
|
|
||||||
|
|
||||||
for file in pkg/core/*; do
|
for file in pkg/core/*; do
|
||||||
app="$(basename $file)";
|
app="$(basename $file)";
|
||||||
# tar platform
|
# tar platform
|
||||||
for os in linux darwin windows; do
|
for os in linux darwin windows; do
|
||||||
_target="$app-$_tag.$os-$_arch.tar.gz"
|
_target="$app-$_tag.$os-$_arch.tar.gz"
|
||||||
CGO_ENABLED=0 GOOS=$os GOARCH=$_arch \
|
CGO_ENABLED=0 GOOS=$os GOARCH=$_arch \
|
||||||
go build -o bin/backend "./cmd/$app"
|
go build -o backend "./cmd/$app"
|
||||||
if [ "$app" = "eiblog" ]; then
|
if [ "$app" = "eiblog" ]; then
|
||||||
tar czf $_target conf website assets bin/backend
|
tar czf $_target conf website assets backend
|
||||||
else
|
else
|
||||||
tar czf $_target conf bin/backend
|
tar czf $_target conf backend
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
# clean dir ./bin
|
|
||||||
rm -rf ./bin
|
|
||||||
|
|||||||
Reference in New Issue
Block a user