refactor: update check .xz.sha256 file extension. (#167)
- Simplify the `sha256_file` variable assignment in `bump_version.sh` We always have `.xz.sha256` files. Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> Reviewed-on: https://gitea.com/gitea/homebrew-gitea/pulls/167 Reviewed-by: Jason Song <i@wolfogre.com> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-committed-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
7cfa76110b
commit
f355d3857d
|
@ -23,11 +23,7 @@ for bin in ${binaries};do
|
|||
|
||||
file_url="https://dl.gitea.com/${bin}/${version}"
|
||||
for os in ${supported_os}; do
|
||||
sha256_file="${bin}-${version}-${os}"
|
||||
if [ "$os" != "linux-386" -a "$os" != "linux-arm64" ]; then
|
||||
sha256_file="${sha256_file}.xz"
|
||||
fi
|
||||
sha256_file="${sha256_file}.sha256"
|
||||
sha256_file="${bin}-${version}-${os}.xz.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}"
|
||||
|
|
Loading…
Reference in New Issue