;tools: ghruns-download, ghrelease-upload: improvements

This commit is contained in:
Simon Michael 2025-03-08 08:09:49 -10:00
parent 49341de786
commit 7c78fec64e

View File

@ -1530,22 +1530,24 @@ _on-master-branch:
just ghrun-open binaries-mac-x64 just ghrun-open binaries-mac-x64
just ghrun-open binaries-windows-x64 just ghrun-open binaries-windows-x64
# Download the binaries from the latest runs of the main binary workflows. Unzips them, unfortunately. # Download any new binaries from the latest runs of the main binary github workflows, and recompress them.
@ghruns-download: ghruns-download:
#!/usr/bin/env bash cd tmp; rm -rf hledger-*64
cd tmp cd tmp; gh run download $(just ghrun-id binaries-linux-x64)
gh run download $(just ghrun-id binaries-linux-x64) cd tmp; gh run download $(just ghrun-id binaries-mac-arm64)
gh run download $(just ghrun-id binaries-mac-arm64) cd tmp; gh run download $(just ghrun-id binaries-mac-x64)
gh run download $(just ghrun-id binaries-mac-x64) cd tmp; gh run download $(just ghrun-id binaries-windows-x64)
gh run download $(just ghrun-id binaries-windows-x64) cd tmp; mv */*.tar .; gzip -f *.tar
cd tmp; zip -j hledger-windows-x64.zip hledger-windows-x64/*
cd tmp; rm -rf hledger-*64
# Gzip the downloaded binaries and upload to the specified github release. Run after ghruns-download. # Upload the downloaded binaries to the specified github release. Run after ghruns-download.
ghrelease-upload VER: ghrelease-upload VER:
gzip $(find tmp -name '*.tar') @read -p "Warning! uploading binaries to release {{ VER }}, are you sure ? Enter to proceed: "
gh release upload {{ VER }} tmp/hledger-linux-x64.tar.gz gh release upload --clobber {{ VER }} tmp/hledger-linux-x64.tar.gz
gh release upload {{ VER }} tmp/hledger-mac-arm64.tar.gz gh release upload --clobber {{ VER }} tmp/hledger-mac-arm64.tar.gz
gh release upload {{ VER }} tmp/hledger-mac-x64.tar.gz gh release upload --clobber {{ VER }} tmp/hledger-mac-x64.tar.gz
gh release upload {{ VER }} tmp/hledger-windows-x64.zip gh release upload --clobber {{ VER }} tmp/hledger-windows-x64.zip
# gh release upload {{ VER }} tmp/hledger-linux-x64/hledger-linux-x64.tar.gz # gh release upload {{ VER }} tmp/hledger-linux-x64/hledger-linux-x64.tar.gz
# gh release upload {{ VER }} tmp/hledger-mac-arm64/hledger-mac-arm64.tar.gz # gh release upload {{ VER }} tmp/hledger-mac-arm64/hledger-mac-arm64.tar.gz
# gh release upload {{ VER }} tmp/hledger-mac-x64/hledger-mac-x64.tar.gz # gh release upload {{ VER }} tmp/hledger-mac-x64/hledger-mac-x64.tar.gz