Skip to content

Commit e0a21d6

Browse files
author
qwe7002
committed
Merge branch 'develop' into 'master'
修改上传脚本 See merge request SilverBlog/SilverBlog_Android!82
2 parents 169de1d + 3306d2f commit e0a21d6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

upload-github-release-asset.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ AUTH="Authorization: token $github_api_token"
4141
WGET_ARGS="--content-disposition --auth-no-challenge --no-cookie"
4242
CURL_ARGS="-LJO#"
4343

44-
curl -H "Authorization: token $github_api_token" -x "${proxy}" -X POST -d '{"tag_name":"'"$tag"'","body":"'"$(git log -1 --pretty=%B --oneline)"'","target_commitish": "master"}' "$GH_REPO/releases"
44+
curl -H "Authorization: token $github_api_token" -X POST -d '{"tag_name":"'"$tag"'","body":"'"$(git log -1 --pretty=%B --oneline)"'","target_commitish": "master"}' "$GH_REPO/releases"
4545

4646
if [[ "$tag" == 'LATEST' ]]; then
4747
GH_TAGS="$GH_REPO/releases/latest"
4848
fi
4949

5050
# Validate token.
51-
curl -o /dev/null -x "${proxy}" -sH "$AUTH" $GH_REPO || { echo "Error: Invalid repo, token or network issue!"; exit 1; }
51+
curl -o /dev/null -sH "$AUTH" $GH_REPO || { echo "Error: Invalid repo, token or network issue!"; exit 1; }
5252

5353
# Read asset tags.
5454
response=$(curl -sH "$AUTH" $GH_TAGS)
@@ -62,4 +62,4 @@ echo "Uploading asset... "
6262

6363
# Construct url
6464

65-
curl "$GITHUB_OAUTH_BASIC" -x "${proxy}" --data-binary @"$filename" -H "Authorization: token $github_api_token" -H "Content-Type: application/octet-stream" "https://uploads.github.com/repos/$owner/$repo/releases/$id/assets?name=$(basename $filename)"
65+
curl "$GITHUB_OAUTH_BASIC" --data-binary @"$filename" -H "Authorization: token $github_api_token" -H "Content-Type: application/octet-stream" "https://uploads.github.com/repos/$owner/$repo/releases/$id/assets?name=$(basename $filename)"

0 commit comments

Comments
 (0)