Skip to content

Commit f764790

Browse files
committed
fixup! fixup! build: add create release proposal action
1 parent 63c8308 commit f764790

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

tools/actions/create-release.sh

+2-10
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,9 @@ git push
2222
TITLE=$(awk "/^## ${RELEASE_DATE}/ { print substr(\$0, 4) }" "doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md")
2323

2424
# Use a temporary file for the PR body
25-
TEMP_BODY=$(mktemp)
26-
awk "/## ${RELEASE_DATE}/,/^<a id=/{ if (!/^<a id=/) print }" "doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md" > "$TEMP_BODY"
25+
TEMP_BODY="$(awk "/## ${RELEASE_DATE}/,/^<a id=/{ if (!/^<a id=/) print }" "doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md")"
2726

28-
gh pr create --title "$TITLE" --body-file "$TEMP_BODY" --base "v$RELEASE_LINE.x"
29-
30-
# Dynamically get the repository (owner/repo) and branch
31-
REPO=$(git remote get-url origin | sed -E 's|^.*github.com[/:]([^/]+/[^.]+)(\.git)?$|\1|')
32-
BRANCH=$(git branch --show-current)
33-
34-
# Get the PR URL for the current branch in the repository
35-
PR_URL=$(gh pr list --repo "$REPO" --head "$BRANCH" --json url -q ".[0].url")
27+
PR_URL="$(gh pr create --title "$TITLE" --body "$TEMP_BODY" --base "v$RELEASE_LINE.x")"
3628

3729
# Get the last commit message
3830
LAST_COMMIT_MSG=$(git log -1 --pretty=%B)

0 commit comments

Comments
 (0)