Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
1.0 KiB
Bash
Raw Normal View History

2024-05-24 12:59:53 +02:00
#!/usr/bin/env nix-shell
2024-06-16 13:05:53 +02:00
#!nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts
BASEDIR="$(dirname "$0")/../../../.."
2024-05-24 12:59:53 +02:00
latestVersion=$(curl "https://api.github.com/repos/dbeaver/dbeaver/tags" | jq -r '.[0].name')
currentVersion=$(nix-instantiate --eval -E "with import ${BASEDIR} {}; lib.getVersion dbeaver-bin" | tr -d '"')
2024-05-24 12:59:53 +02:00
echo "latest version: $latestVersion"
echo "current version: $currentVersion"
if [[ "$latestVersion" == "$currentVersion" ]]; then
echo "package is up-to-date"
exit 0
fi
for i in \
"x86_64-linux linux.gtk.x86_64-nojdk.tar.gz" \
2024-06-16 21:34:46 +08:00
"aarch64-linux linux.gtk.aarch64-nojdk.tar.gz" \
"x86_64-darwin macos-x86_64.dmg" \
"aarch64-darwin macos-aarch64.dmg"
2024-05-24 12:59:53 +02:00
do
set -- $i
prefetch=$(nix-prefetch-url "https://github.com/dbeaver/dbeaver/releases/download/$latestVersion/dbeaver-ce-$latestVersion-$2")
hash=$(nix-hash --type sha256 --to-sri $prefetch)
(cd "$BASEDIR" && update-source-version dbeaver-bin $latestVersion $hash --system=$1 --ignore-same-version)
2024-05-24 12:59:53 +02:00
done