-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe25c26
commit 4fca9da
Showing
6 changed files
with
59 additions
and
82 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
owner: recurly | ||
repo: recurly-client-node | ||
tag_matcher: ^4\..* | ||
required_issue_labels: | ||
- V4 | ||
exclude_labels: | ||
- bug? | ||
- internal | ||
- duplicate | ||
- question |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,36 +1,50 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# major,minor,patch | ||
PART=${1} | ||
NEXT_VERSION=$(./scripts/bump --next-version $PART) | ||
UNRELEASED_LOG="/tmp/node-pending-changes.md" | ||
|
||
if [ -z "$NEXT_VERSION" ]; then | ||
echo "Failed to get next version" | ||
else | ||
# Generate pending changes in tmpfile | ||
./scripts/changelog --pending $UNRELEASED_LOG | ||
# Add a git message header of Release X.Y.Z | ||
printf "Release $NEXT_VERSION\n\n$(cat $UNRELEASED_LOG)" > $UNRELEASED_LOG | ||
# Delete credit line | ||
sed -i '' -e '$ d' $UNRELEASED_LOG | ||
|
||
git checkout -b release-$NEXT_VERSION | ||
|
||
# Actually bump the version | ||
./scripts/bump $PART | ||
# Usage | ||
# | ||
# ./prepare-release major|minor|patch [--notes-out <path>] [--tag-out <path>] | ||
# | ||
|
||
# Rebuild docs | ||
./scripts/build | ||
set -e | ||
|
||
# Make the commit | ||
git add . --all | ||
git commit -F $UNRELEASED_LOG | ||
if [ -n "$(git status --porcelain)" ]; then | ||
echo "Working directory is not clean. Aborting." | ||
exit 1 | ||
fi | ||
|
||
# Push up this branch for PR | ||
git push origin release-$NEXT_VERSION | ||
if [ -z "$GITHUB_TOKEN" ]; then | ||
echo "GITHUB_TOKEN must be set. Aborting." | ||
exit 1 | ||
fi | ||
|
||
# Create PR | ||
hub pull-request -c -F $UNRELEASED_LOG | ||
# Bump version | ||
# major|minor|patch | ||
part=${1} | ||
if [ "$part" != "patch" ] && [ "$part" != "minor" ] && [ "$part" != "major" ]; then | ||
echo "'$part' is not a valid option: major|minor|patch" | ||
exit 1 | ||
fi | ||
new_version=$(bump2version --list "$part" | grep new_version | cut -d "=" -f 2) | ||
|
||
# Generate Changelog | ||
changelogly --future-release "$new_version" | ||
|
||
while [[ "$#" -gt 0 ]]; do | ||
case $1 in | ||
# Create release notes artifact | ||
-n|--notes-out) | ||
echo "$new_version | ||
$( | ||
cat CHANGELOG.md | sed -n "/^## \[$new_version\]/,/^##/p" | sed '$d;1d' | ||
)" | awk '{$1=$1};1' > $2 | ||
shift | ||
;; | ||
|
||
# Create release notes artifact | ||
-t|--tag-out) | ||
echo "v$new_version" > $2 | ||
;; | ||
esac | ||
shift | ||
done |
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,27 +1,12 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# TODO this file could be gone | ||
RELEASED_LOG="/tmp/node-pending-changes.md" | ||
THIS_VERSION=$(./scripts/bump --this-version) | ||
set -e | ||
|
||
# Generate the changelog with changes in this release | ||
./scripts/changelog --release-tag "$THIS_VERSION" | ||
git add CHANGELOG.md | ||
git commit -m "Update Changelog for Release $THIS_VERSION" | ||
git push origin master | ||
# Usage | ||
# | ||
# ./release | ||
# | ||
|
||
# publish to npm | ||
npm publish | ||
|
||
# create release | ||
hub release create -c -F $RELEASED_LOG $THIS_VERSION | ||
|
||
# Copy-pasteable messages for announcments | ||
echo ":nodejs: Node.js $THIS_VERSION Released :nodejs:" | ||
echo ":npm: Npm: https://www.npmjs.com/package/recurly/v/$THIS_VERSION" | ||
echo "Release: https://github.com/recurly/recurly-client-node/releases/tag/$THIS_VERSION" | ||
echo "Changelog:" | ||
echo "\`\`\`" | ||
cat "$RELEASED_LOG" | ||
echo "\`\`\`" |