fix: stabilize NixOS polkit and disconnect exit

This commit is contained in:
Kevin Yue committed 2026-06-23 19:30:20 +08:00
1 parent 352a2efb35
commit f41303c797
3 files changed
+70 -14

No files matched your search

+16 -8
View File
@@ -29,19 +29,27 @@ if [[ "$release_tag" != "v$version" ]]; then
body="Updates the Nix flake fetchzip hashes for v${version} using ${release_tag} release assets."
fi
branch="chore/update-flake-hashes-${branch_suffix}"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
if [[ "$release_tag" == "snapshot" ]]; then
source_branch="${GITHUB_REF_NAME:-$(git branch --show-current)}"
source_branch_slug="$(printf '%s' "$source_branch" | sed -E 's#[/[:space:]]+#-#g; s#[^A-Za-z0-9._-]##g; s#^-+##; s#-+$##')"
branch="chore/flake-${source_branch_slug}"
git switch -C "$branch"
git add flake.nix
git commit -m "$title"
git push --force origin "$branch"
echo "Updated snapshot flake hashes on branch $branch from $source_branch; skipping PR creation"
exit 0
fi
branch="chore/update-flake-hashes-${branch_suffix}"
git switch -C "$branch"
git add flake.nix
git commit -m "$title"
git push --force-with-lease origin "$branch"
if [[ "$release_tag" == "snapshot" ]]; then
echo "Updated snapshot flake hashes on branch $branch; skipping PR creation"
exit 0
fi
git push --force origin "$branch"
if gh pr view "$branch" --json number > /tmp/flake-pr.json 2> /dev/null; then
pr_number="$(jq -r '.number' /tmp/flake-pr.json)"