From b79b2acecab797b4ba01ed5f740d4d9101cd7281 Mon Sep 17 00:00:00 2001 From: esrrhs Date: Wed, 29 Nov 2023 11:44:01 +0800 Subject: [PATCH] update --- pack.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pack.sh b/pack.sh index f334284..5961333 100755 --- a/pack.sh +++ b/pack.sh @@ -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}') @@ -32,7 +34,7 @@ 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 @@ -40,7 +42,7 @@ for line in $build_list; do 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