chore: improve test coverage and API efficiency

- Add echo statements to display the updated binary version and its corresponding os and sha256 values in `bump_version.sh`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2023-05-03 09:40:22 +08:00
parent 04eaa6b044
commit 8852de1ec4
1 changed files with 2 additions and 0 deletions

View File

@ -19,6 +19,7 @@ for bin in ${binaries};do
esac
latest=$(curl -sL -o /dev/null -w %{url_effective} "${git_url}/releases/latest")
version="${latest##*/v}"
echo "update ${bin} version: ${version}"
file_url="https://dl.gitea.com/${bin}/${version}"
for os in ${supported_os}; do
@ -28,6 +29,7 @@ for bin in ${binaries};do
fi
sha256_file="${sha256_file}.sha256"
sha256=$(curl -sL "${file_url}/${sha256_file}" | awk '{print$1}')
echo "update ${bin} os: ${os}, sha256: ${sha256}"
sed -r "s/^(\s+when \"${os}\" then).*\"(.*)$/\1 \"${sha256}\"\2/" -i "${file}"
done
sed -r "s/^(\s+version).*/\1 \"${version}\"/" -i "${file}"