1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p curl common-updater-scripts
4 oldVersion
="$(nix-instantiate --eval -E "with import .
/.
{}; lib.getVersion wiki-js
" | tr -d '"')"
5 latestTag="$(git ls-remote --tags --sort="v:refname" https://github.com/Requarks/wiki.git | tail -1 | awk '{ print
$2 }' | sed -E "s,^refs/tags/v(.*)$,\1,")"
7 targetVersion="${1:-$latestTag}"
8 if [ ! "${oldVersion}" = "${targetVersion}" ]; then
9 update-source-version wiki-js "${targetVersion}"
12 echo "wiki-js is already up-to-date"