Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
esrrhs committed Nov 29, 2023
1 parent 8edc6b7 commit b79b2ac
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ export GO111MODULE=on
#go tool dist list
build_list=$(go tool dist list)

go mod tidy

cd cmd/

rm pack -rf
rm pack.zip -f
mkdir pack

go mod tidy

for line in $build_list; do
os=$(echo "$line" | awk -F"/" '{print $1}')
arch=$(echo "$line" | awk -F"/" '{print $2}')
Expand All @@ -32,15 +34,15 @@ for line in $build_list; do
exit 1
fi
if [ $os = "windows" ]; then
zip ${NAME}_"${os}"_"${arch}"".zip" $NAME".exe"
zip ${NAME}_"${os}"_"${arch}"".zip" cmd.exe
if [ $? -ne 0 ]; then
echo "os="$os" arch="$arch" zip fail"
exit 1
fi
mv ${NAME}_"${os}"_"${arch}"".zip" pack/
rm $NAME".exe" -f
else
zip ${NAME}_"${os}"_"${arch}"".zip" $NAME
zip ${NAME}_"${os}"_"${arch}"".zip" cmd
if [ $? -ne 0 ]; then
echo "os="$os" arch="$arch" zip fail"
exit 1
Expand Down

0 comments on commit b79b2ac

Please sign in to comment.