depot/third_party/nixpkgs/pkgs/development/tools/marksman/update.sh
Default email 6d4aeb4377 Project import generated by Copybara.
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
2023-01-11 08:51:40 +01:00

18 lines
617 B
Bash
Executable file

#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts
#shellcheck shell=bash
set -eu -o pipefail
version=$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
https://api.github.com/repos/artempyanykh/marksman/releases/latest | jq -e -r .tag_name)
old_version=$(nix-instantiate --eval -A marksman.version | jq -e -r)
if [[ $version == "$old_version" ]]; then
echo "New version same as old version, nothing to do." >&2
exit 0
fi
update-source-version marksman "$version"
$(nix-build -A marksman.fetch-deps --no-out-link) "$(dirname -- "${BASH_SOURCE[0]}")/deps.nix"