mirror of
https://gitea.com/gitea/homebrew-gitea.git
synced 2024-06-02 10:11:26 +05:30
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:
parent
04eaa6b044
commit
8852de1ec4
|
@ -19,6 +19,7 @@ for bin in ${binaries};do
|
||||||
esac
|
esac
|
||||||
latest=$(curl -sL -o /dev/null -w %{url_effective} "${git_url}/releases/latest")
|
latest=$(curl -sL -o /dev/null -w %{url_effective} "${git_url}/releases/latest")
|
||||||
version="${latest##*/v}"
|
version="${latest##*/v}"
|
||||||
|
echo "update ${bin} version: ${version}"
|
||||||
|
|
||||||
file_url="https://dl.gitea.com/${bin}/${version}"
|
file_url="https://dl.gitea.com/${bin}/${version}"
|
||||||
for os in ${supported_os}; do
|
for os in ${supported_os}; do
|
||||||
|
@ -28,6 +29,7 @@ for bin in ${binaries};do
|
||||||
fi
|
fi
|
||||||
sha256_file="${sha256_file}.sha256"
|
sha256_file="${sha256_file}.sha256"
|
||||||
sha256=$(curl -sL "${file_url}/${sha256_file}" | awk '{print$1}')
|
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}"
|
sed -r "s/^(\s+when \"${os}\" then).*\"(.*)$/\1 \"${sha256}\"\2/" -i "${file}"
|
||||||
done
|
done
|
||||||
sed -r "s/^(\s+version).*/\1 \"${version}\"/" -i "${file}"
|
sed -r "s/^(\s+version).*/\1 \"${version}\"/" -i "${file}"
|
||||||
|
|
Loading…
Reference in a new issue