Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,15 @@ if [[ $confirm =~ ^[Yy]$ ]]; then
for cmd in "${push_cmds[@]}"; do echo "+ $cmd"; bash -c "$cmd"; done
echo "🎉 All pushes completed."

# --- resolve the GitHub repo explicitly so gh doesn't depend on a default ----
# Clones with multiple remotes have no inferred default repo, which makes
# `gh pr create` fail. Derive owner/repo from the origin remote URL.
# Handles both https://github.com/owner/repo(.git) and git@github.com:owner/repo(.git)
REPO_SLUG="$(git remote get-url origin | sed -E -e 's#\.git$##' -e 's#^.*github\.com[:/]##')"

echo; echo "📝 Opening sync PR ${RELEASE_BRANCH} → ${DEV_BRANCH} …"
gh pr create \
--repo "$REPO_SLUG" \
--base "$DEV_BRANCH" \
--head "$RELEASE_BRANCH" \
--title "Sync v${new_ver} version bump to dev" \
Expand All @@ -150,6 +157,7 @@ if [[ $confirm =~ ^[Yy]$ ]]; then

echo; echo "📝 Opening release PR ${RELEASE_BRANCH} → ${MAIN_BRANCH} …"
gh pr create \
--repo "$REPO_SLUG" \
--base "$MAIN_BRANCH" \
--head "$RELEASE_BRANCH" \
--title "Release v${new_ver}" \
Expand Down
Loading