mirror of
https://github.com/lelgenio/dzgui-nix.git
synced 2025-06-16 03:42:56 -03:00
track releases using commit hash, add update script
This commit is contained in:
parent
d3b2f98b54
commit
36b7c8eb1d
5 changed files with 101 additions and 79 deletions
16
package/update.sh
Executable file
16
package/update.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq ripgrep common-updater-scripts
|
||||
|
||||
set -xe
|
||||
|
||||
latest_commit="$(
|
||||
curl -L -s ${GITHUB_TOKEN:+-u ":${GITHUB_TOKEN}"} https://api.github.com/repos/aclist/dztui/branches/master \
|
||||
| jq -r .commit.sha
|
||||
)"
|
||||
|
||||
version="$(
|
||||
curl https://raw.githubusercontent.com/aclist/dztui/$latest_commit/dzgui.sh \
|
||||
| rg '^version=(.*)$' --replace '$1'
|
||||
)"
|
||||
|
||||
update-source-version dzgui "$version" --rev=$latest_commit
|
Loading…
Add table
Add a link
Reference in a new issue