From 998552c0d90279c924bd3d7c288d0a676811ecb8 Mon Sep 17 00:00:00 2001 From: Builder Date: Wed, 24 Jan 2024 16:25:53 +0800 Subject: [PATCH] Release 2.3.52 --- RELEASE | 16 ++++++++++ releases/v2.3.52/installer-linux-x64.bin.md5 | 1 + releases/v2.3.52/installer-linux-x86.bin.md5 | 1 + .../v2.3.52/installer-windows-x64.exe.md5 | 1 + .../v2.3.52/installer-windows-x86.exe.md5 | 1 + releases/v2.3.52/upgrader.zip.md5 | 1 + scripts/git-release-assets.sh | 29 ++++++++++--------- 7 files changed, 37 insertions(+), 13 deletions(-) create mode 100644 releases/v2.3.52/installer-linux-x64.bin.md5 create mode 100644 releases/v2.3.52/installer-linux-x86.bin.md5 create mode 100644 releases/v2.3.52/installer-windows-x64.exe.md5 create mode 100644 releases/v2.3.52/installer-windows-x86.exe.md5 create mode 100644 releases/v2.3.52/upgrader.zip.md5 diff --git a/RELEASE b/RELEASE index c368aa3..d2d6c31 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1,17 @@ v2.3.49 +2.3.52 +2.3.52 +2.3.52 +2.3.52 +2.3.52 +2.3.52 +2.3.52 +2.3.52 +2.3.52 +2.3.52 +2.3.52 +2.3.52 +2.3.52 +2.3.52 +2.3.52 +2.3.52 diff --git a/releases/v2.3.52/installer-linux-x64.bin.md5 b/releases/v2.3.52/installer-linux-x64.bin.md5 new file mode 100644 index 0000000..faddf36 --- /dev/null +++ b/releases/v2.3.52/installer-linux-x64.bin.md5 @@ -0,0 +1 @@ +699d7693db53ddb83514491646985600 diff --git a/releases/v2.3.52/installer-linux-x86.bin.md5 b/releases/v2.3.52/installer-linux-x86.bin.md5 new file mode 100644 index 0000000..228841d --- /dev/null +++ b/releases/v2.3.52/installer-linux-x86.bin.md5 @@ -0,0 +1 @@ +d5d9daaaf4965c21fad4eb74b5af345c diff --git a/releases/v2.3.52/installer-windows-x64.exe.md5 b/releases/v2.3.52/installer-windows-x64.exe.md5 new file mode 100644 index 0000000..475675a --- /dev/null +++ b/releases/v2.3.52/installer-windows-x64.exe.md5 @@ -0,0 +1 @@ +edd25b3023ecd0944016d79db860db23 diff --git a/releases/v2.3.52/installer-windows-x86.exe.md5 b/releases/v2.3.52/installer-windows-x86.exe.md5 new file mode 100644 index 0000000..63dcc28 --- /dev/null +++ b/releases/v2.3.52/installer-windows-x86.exe.md5 @@ -0,0 +1 @@ +dfd8c5649730ee661c0a9dd7cee4ab21 diff --git a/releases/v2.3.52/upgrader.zip.md5 b/releases/v2.3.52/upgrader.zip.md5 new file mode 100644 index 0000000..2490a53 --- /dev/null +++ b/releases/v2.3.52/upgrader.zip.md5 @@ -0,0 +1 @@ +343a538e42cf65670a6fad909cfa48f7 diff --git a/scripts/git-release-assets.sh b/scripts/git-release-assets.sh index d94f695..eeec054 100755 --- a/scripts/git-release-assets.sh +++ b/scripts/git-release-assets.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # if we shall try to delete an asset before uploading delete=0 @@ -15,8 +15,8 @@ do case $opt in (c) create=1 ;; (d) delete=1 ;; - (m) message=${OPTARG};; - (t) token=${OPTARG};; + (m) message="${OPTARG}";; + (t) token="${OPTARG}";; (h|?) echo "Usage: git-release-assets.sh [-d] [-h|?] [ []]" echo " -c Create a release if it is not existing" @@ -64,10 +64,10 @@ fi # best effort, if already exists, ignore create_tag() { tag=$1 - message=$2 + msg="$2" echo "Creating tag $tag ..." - git tag -a $tag -m "$message" + git tag -a $tag -m "$msg" git push --tags echo "Tag $tag created." } @@ -94,8 +94,11 @@ get_release() { "https://api.github.com/repos/$OWNER/$REPO/releases/tags/$tag" ) - http_code=$(tail -n1 <<< "$response") # get the last line - content=$(sed '$ d' <<< "$response") # get all but the last line which contains the status code + # get the last line + http_code=$(tail -n1 <<< "$response") + + # get all but the last line which contains the status code + content=$(sed '$ d' <<< "$response") if [ $http_code = 200 ]; then jq '.id' <<< "$content" @@ -109,16 +112,16 @@ get_release() { # best effort, if already exists, ignore create_release() { tag=$1 - message=$2 + msg="$2" # first create the tag echo "Try create tag $tag ..." - create_tag $tag $message; + create_tag $tag "$msg"; # now create the release echo "Try create release with tag $tag ..." - data=$(printf '{"tag_name": "%s","target_commitish": "main","name": "%s","body": "%s","draft": false,"prerelease": false,"generate_release_notes":false}' $tag $tag "$message") + data=$(printf '{"tag_name": "%s","target_commitish": "main","name": "%s","body": "%s","draft": false,"prerelease": false,"generate_release_notes":false}' $tag $tag "$msg") response=$( curl -sL -w '%{http_code}'\ @@ -133,7 +136,7 @@ create_release() { http_code=$(tail -n1 <<< "$response") # get the last line content=$(sed '$ d' <<< "$response") # get all but the last line which contains the status code - if [ $http_code = 200 ]; then + if [ $http_code = 201 ]; then echo "Release with tag $tag successfully created" elif [ $http_code = 422 ]; then echo "Release with tag $tag already exists" @@ -263,7 +266,7 @@ list_assets() { if [ $http_code = 200 ]; then echo "Assets in release with tag $RELEASE_TAG:" - jq '.[] | .name + " => " + (.size|tostring)' <<< "$content" + jq '.[] | .name + " => " + (.size|tostring) + ": " + .url' <<< "$content" else printf "ERROR: Something went wrong (status code: $http_code), aborting!\n" >&2 exit 1 @@ -276,7 +279,7 @@ if [ -z "$RELEASE_TAG" ]; then elif [ -z "$FILE" ]; then if [ $create -eq 1 ]; then echo "Try create release with tag $RELEASE_TAG ..." - create_release $RELEASE_TAG $message + create_release $RELEASE_TAG "$message" elif [ $delete -eq 1 ]; then echo "Try delete release with tag $RELEASE_TAG ..." remove_release $RELEASE_TAG