forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! fixup! fixup! fixup! build: add create release proposal action
- Loading branch information
1 parent
3171892
commit df3289b
Showing
1 changed file
with
18 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,30 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
set -xe | ||
|
||
RELEASE_DATE=$1 | ||
RELEASE_LINE=$2 | ||
|
||
if [ -z "$RELEASE_DATE" ] || [ -z "$RELEASE_LINE" ]; then | ||
echo "Usage: $0 <RELEASE_DATE> <RELEASE_LINE>" | ||
exit 1 | ||
fi | ||
|
||
git config --local user.email "[email protected]" | ||
git config --local user.name "Node.js GitHub Bot" | ||
|
||
git node release --prepare --skipBranchDiff --yes | ||
git node release --prepare --skipBranchDiff --yes --releaseDate "$RELEASE_DATE" | ||
# We use it to not specify the branch name as it changes based on | ||
# the commit list (semver-minor/semver-patch) | ||
git config push.default current | ||
awk "/## ${RELEASE_DATE}/,/^<a id=/{ if (!/^<a id=/) print }" \ | ||
"doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md" |\ | ||
gh pr create --body-file - | ||
# TODO: ammend with proposal PR | ||
|
||
# Use a temporary file for the PR body | ||
TEMP_BODY=$(mktemp) | ||
awk "/## ${RELEASE_DATE}/,/^<a id=/{ if (!/^<a id=/) print }" "doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md" > "$TEMP_BODY" | ||
|
||
gh pr create --body-file "$TEMP_BODY" | ||
|
||
# Clean up the temporary file | ||
rm "$TEMP_BODY" | ||
|
||
# TODO: amend with proposal PR |