feat(update-zen-browser): more verbose logs + handling when upstream version is null

This commit is contained in:
Luis Quiñones
2024-10-12 09:23:42 -06:00
parent 29351a2822
commit 9ae4c93d21
2 changed files with 9 additions and 1 deletions

View File

@@ -1,6 +1,10 @@
#!/bin/sh
upstream=$(curl -s https://api.github.com/repos/zen-browser/desktop/releases/latest | jq -r '.tag_name')
echo "Fetching upstream version from GitHub API..." >&2
upstream_data=$(curl -vs https://api.github.com/repos/zen-browser/desktop/releases/latest)
echo "Upstream data: $upstream_data" >&2
upstream=$(echo "$upstream_data" | jq -r '.tag_name')
local=$(grep -oP 'version = "\K[^"]+' flake.nix)
if [ "$upstream" != "$local" ]; then

View File

@@ -3,6 +3,10 @@
script_dir="$(dirname -- "$0")"
upstream=$("$script_dir/new-version.sh" | cat -)
if [ "$upstream" == "null" ]; then
echo "Unable to determine new upstream version"
return 1
fi
echo "Updating to $upstream"