-
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.
Merge pull request #26 from recurly/scripts-and-bump-3-0-0
Add some more scripts and bump to 3.0.0
- Loading branch information
Showing
7 changed files
with
103 additions
and
1 deletion.
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,10 @@ | ||
[bumpversion] | ||
current_version = 3.0.0 | ||
parse = (?P<major>\d+) | ||
\.(?P<minor>\d+) | ||
\.(?P<patch>\d+) | ||
serialize = | ||
{major}.{minor}.{patch} | ||
|
||
[bumpversion:file:version.go] | ||
|
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,8 @@ | ||
user=recurly | ||
project=recurly-client-go | ||
unreleased=false | ||
exclude-labels=question,bug?,duplicate | ||
exclude-tags-regex=^[^3]+\..* | ||
issues-wo-labels=false | ||
verbose=false | ||
since-tag=3.0.0-beta.1 |
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 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
if [ "$1" == "--next-version" ]; then | ||
shift | ||
bump2version --dry-run --list "$@" | grep new_version | cut -d "=" -f 2 | ||
elif [ "$1" == "--this-version" ]; then | ||
grep current_version .bumpversion.cfg | awk -F" = " '{print $2}' | ||
else | ||
bump2version "$@" | ||
fi |
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,14 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
if [ -z "$GITHUB_TOKEN" ]; then | ||
echo "Environment variable GITHUB_TOKEN must be set" | ||
else | ||
if [ "$1" == "--pending" ]; then | ||
github_changelog_generator -t $GITHUB_TOKEN --unreleased-only -o "$2" | ||
elif [ "$1" == "--release-tag" ]; then | ||
github_changelog_generator -t $GITHUB_TOKEN --unreleased true --unreleased-label "$2" | ||
else | ||
github_changelog_generator -t $GITHUB_TOKEN | ||
fi | ||
fi |
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,36 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# major,minor,patch | ||
PART=${1} | ||
NEXT_VERSION=$(./scripts/bump --next-version "$PART") | ||
UNRELEASED_LOG="/tmp/go-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 %s\n\n$(cat $UNRELEASED_LOG)" "$NEXT_VERSION" > $UNRELEASED_LOG | ||
# Delete credit line | ||
sed -i '' -e '$ d' $UNRELEASED_LOG | ||
|
||
git checkout -b "release-$NEXT_VERSION" | ||
|
||
# Actually bump the version | ||
./scripts/bump "$PART" | ||
|
||
# Rebuild docs | ||
./scripts/build | ||
|
||
# Make the commit | ||
git add . --all | ||
git commit -F "$UNRELEASED_LOG" | ||
|
||
# Push up this branch for PR | ||
git push origin "release-$NEXT_VERSION" | ||
|
||
# Create PR | ||
hub pull-request -c -F "$UNRELEASED_LOG" | ||
fi |
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,23 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# TODO this file could be gone | ||
RELEASED_LOG="/tmp/go-pending-changes.md" | ||
THIS_VERSION=$(./scripts/bump --this-version) | ||
|
||
# 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 | ||
|
||
# create release | ||
hub release create -c -F "$RELEASED_LOG" "$THIS_VERSION" | ||
|
||
# Copy-pasteable messages for announcments | ||
echo ":partygopher: Go $THIS_VERSION Released :partygopher:" | ||
echo "Release: https://github.com/recurly/recurly-client-go/releases/tag/$THIS_VERSION" | ||
echo "Changelog:" | ||
echo "\`\`\`" | ||
cat "$RELEASED_LOG" | ||
echo "\`\`\`" |
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,5 +1,5 @@ | ||
package recurly | ||
|
||
const ( | ||
clientVersion = "3.0.0-beta.1" | ||
clientVersion = "3.0.0" | ||
) |