Skip to content

Commit 6c5c226

Browse files
committed
upload: fix flags
1 parent 0fcb72e commit 6c5c226

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

tools/finish_release.sh

+17-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
set -e
4+
35
VERSION=$1
46

57
ALIYUN="./out/aliyun"
@@ -9,47 +11,47 @@ go build -ldflags "-X 'github.com/aliyun/aliyun-cli/cli.Version=${VERSION}'" -o
911
FLAGS="oss://aliyun-cli --force --access-key-id ${ACCESS_KEY_ID} --access-key-secret ${ACCESS_KEY_SECRET} --region cn-hangzhou"
1012

1113
# mac amd64
12-
${ALIYUN} oss cp ./aliyun-cli-macosx-"${VERSION}"-amd64.tgz "$FLAGS"
14+
${ALIYUN} oss cp ./aliyun-cli-macosx-"${VERSION}"-amd64.tgz $FLAGS
1315
# mac arm64
14-
${ALIYUN} oss cp ./aliyun-cli-macosx-"${VERSION}"-arm64.tgz "$FLAGS"
16+
${ALIYUN} oss cp ./aliyun-cli-macosx-"${VERSION}"-arm64.tgz $FLAGS
1517
# mac universal
16-
${ALIYUN} oss cp ./aliyun-cli-macosx-"${VERSION}"-universal.tgz "$FLAGS"
18+
${ALIYUN} oss cp ./aliyun-cli-macosx-"${VERSION}"-universal.tgz $FLAGS
1719
# mac pkg
18-
${ALIYUN} oss cp ./aliyun-cli-"${VERSION}".pkg "$FLAGS"
20+
${ALIYUN} oss cp ./aliyun-cli-"${VERSION}".pkg $FLAGS
1921
# linux amd64
20-
${ALIYUN} oss cp ./aliyun-cli-linux-"${VERSION}"-amd64.tgz "$FLAGS"
22+
${ALIYUN} oss cp ./aliyun-cli-linux-"${VERSION}"-amd64.tgz $FLAGS
2123
# linux arm64
22-
${ALIYUN} oss cp ./aliyun-cli-linux-"${VERSION}"-arm64.tgz "$FLAGS"
24+
${ALIYUN} oss cp ./aliyun-cli-linux-"${VERSION}"-arm64.tgz $FLAGS
2325
# windows
24-
${ALIYUN} oss cp ./aliyun-cli-windows-"${VERSION}"-amd64.zip "$FLAGS"
26+
${ALIYUN} oss cp ./aliyun-cli-windows-"${VERSION}"-amd64.zip $FLAGS
2527

2628
if [[ "$VERSION" == *"-beta" ]]; then
2729
echo "beta. skip."
2830
else
2931
cp ./aliyun-cli-macosx-"${VERSION}"-amd64.tgz ./aliyun-cli-macosx-latest-amd64.tgz
30-
${ALIYUN} oss cp ./aliyun-cli-macosx-latest-amd64.tgz "$FLAGS"
32+
${ALIYUN} oss cp ./aliyun-cli-macosx-latest-amd64.tgz $FLAGS
3133

3234
cp ./aliyun-cli-macosx-"${VERSION}"-arm64.tgz ./aliyun-cli-macosx-latest-arm64.tgz
33-
${ALIYUN} oss cp ./aliyun-cli-macosx-latest-arm64.tgz "$FLAGS"
35+
${ALIYUN} oss cp ./aliyun-cli-macosx-latest-arm64.tgz $FLAGS
3436

3537
cp ./aliyun-cli-macosx-"${VERSION}"-universal.tgz ./aliyun-cli-macosx-latest-universal.tgz
36-
${ALIYUN} oss cp ./aliyun-cli-macosx-latest-universal.tgz "$FLAGS"
38+
${ALIYUN} oss cp ./aliyun-cli-macosx-latest-universal.tgz $FLAGS
3739

3840
cp ./aliyun-cli-"${VERSION}".pkg ./aliyun-cli-latest.pkg
39-
${ALIYUN} oss cp ./aliyun-cli-latest.pkg "$FLAGS"
41+
${ALIYUN} oss cp ./aliyun-cli-latest.pkg $FLAGS
4042

4143
cp ./aliyun-cli-linux-"${VERSION}"-amd64.tgz ./aliyun-cli-linux-latest-amd64.tgz
42-
${ALIYUN} oss cp ./aliyun-cli-linux-latest-amd64.tgz "$FLAGS"
44+
${ALIYUN} oss cp ./aliyun-cli-linux-latest-amd64.tgz $FLAGS
4345

4446
cp ./aliyun-cli-linux-"${VERSION}"-arm64.tgz ./aliyun-cli-linux-latest-arm64.tgz
45-
${ALIYUN} oss cp ./aliyun-cli-linux-latest-arm64.tgz "$FLAGS"
47+
${ALIYUN} oss cp ./aliyun-cli-linux-latest-arm64.tgz $FLAGS
4648

4749
cp ./aliyun-cli-windows-"${VERSION}"-amd64.zip ./aliyun-cli-windows-latest-amd64.zip
48-
${ALIYUN} oss cp ./aliyun-cli-windows-latest-amd64.zip "$FLAGS"
50+
${ALIYUN} oss cp ./aliyun-cli-windows-latest-amd64.zip $FLAGS
4951
# local version
5052

5153
echo "${VERSION}" > out/version
52-
${ALIYUN} oss cp out/version "$FLAGS"
54+
${ALIYUN} oss cp out/version $FLAGS
5355

5456
RELEASE_ID=$(curl -fsSL \
5557
-H "Accept: application/vnd.github+json" \

0 commit comments

Comments
 (0)