diff options
author | typebrook <typebrook@gmail.com> | 2020-03-09 15:12:19 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2020-03-09 15:12:19 +0800 |
commit | 24a79b10c9e90ac24c99d3bb33ef347d8961b118 (patch) | |
tree | 7f1c991f7b195c9077146f2508fcba6e8273b4a4 | |
parent | b7d4b0f0f27558bf4d82585e7692a704ac35466b (diff) |
update
-rwxr-xr-x | tools/upload-github-release-asset.sh | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/tools/upload-github-release-asset.sh b/tools/upload-github-release-asset.sh index acff25e..1a7048e 100755 --- a/tools/upload-github-release-asset.sh +++ b/tools/upload-github-release-asset.sh | |||
@@ -88,15 +88,18 @@ upload_asset() { | |||
88 | 88 | ||
89 | edit_release() { | 89 | edit_release() { |
90 | GH_RELEASE="$GH_REPO/releases/$release_id" | 90 | GH_RELEASE="$GH_REPO/releases/$release_id" |
91 | curl -v -X PATCH -H "$AUTH" -H "Content-Type: application/json" $GH_RELEASE \ | 91 | body=$(cat <<EOF |
92 | -d "{ \ | 92 | { |
93 | \"tag_name\": \"$tag\", \ | 93 | "tag_name": "$tag", |
94 | \"target_commitish\": \"master\", \ | 94 | "target_commitish": "master", |
95 | \"name\": \"daily-taiwan-pbf\", \ | 95 | "name": "daily-taiwan-pbf", |
96 | \"body\": \"$(cat $filename | sed 's/"/\\"/g; $! s/$/\\n/' | tr -d '\n') \", \ | 96 | "body": "$(cat $filename | sed 's/"/\\"/g; $! s/$/\\n/' | tr -d '\n')", |
97 | \"draft\": false, \ | 97 | "draft": false, |
98 | \"prerelease\": false \ | 98 | "prerelease": false |
99 | }" | 99 | } |
100 | EOF | ||
101 | ) | ||
102 | curl -v -X PATCH -H "$AUTH" -H "Content-Type: application/json" -d "$body" $GH_RELEASE | ||
100 | } | 103 | } |
101 | 104 | ||
102 | case $type in | 105 | case $type in |