Skip to content

Commit

Permalink
feat(update-zen-browser): more verbose logs + handling when upstream …
Browse files Browse the repository at this point in the history
…version is `null`
  • Loading branch information
luisnquin committed Oct 12, 2024
1 parent 29351a2 commit 9ae4c93
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/new-version.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions .github/update-zen-browser.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 9ae4c93

Please sign in to comment.