Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding changelog generation #74

Merged
merged 1 commit into from
Mar 3, 2020
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions .github_changelog_generator
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
unreleased=false
exclude-labels=question,bug?,duplicate
issues-wo-labels=false
verbose=false
98 changes: 98 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Change Log

## [3.3.0](https://github.com/recurly/recurly-client-java/tree/3.3.0) (2020-02-05)
[Full Changelog](https://github.com/recurly/recurly-client-java/compare/3.2.0...3.3.0)

**Implemented enhancements:**

- Extend createPurchase endpoint with meaningful error message [\#55](https://github.com/recurly/recurly-client-java/issues/55)

**Fixed bugs:**

- transaction\_error is hidden from ApiException when a transaction fails [\#58](https://github.com/recurly/recurly-client-java/issues/58)

**Merged pull requests:**

- Release 3.3.0 [\#61](https://github.com/recurly/recurly-client-java/pull/61) ([bhelx](https://github.com/bhelx))
- Use ErrorMayHaveTransaction instead of Error [\#59](https://github.com/recurly/recurly-client-java/pull/59) ([zhuravskiy](https://github.com/zhuravskiy))
- Include error params in exception message [\#56](https://github.com/recurly/recurly-client-java/pull/56) ([bhelx](https://github.com/bhelx))

## [3.2.0](https://github.com/recurly/recurly-client-java/tree/3.2.0) (2019-12-12)
[Full Changelog](https://github.com/recurly/recurly-client-java/compare/3.1.1...3.2.0)

**Fixed bugs:**

- listPlans endpoint: setIds parameter [\#47](https://github.com/recurly/recurly-client-java/issues/47)
- Fixing invalid request body \(unpermitted parameters \_json\) [\#51](https://github.com/recurly/recurly-client-java/pull/51) ([douglasmiller](https://github.com/douglasmiller))

**Merged pull requests:**

- Applying latest v3 changes [\#52](https://github.com/recurly/recurly-client-java/pull/52) ([douglasmiller](https://github.com/douglasmiller))
- Adding Doug to list of developers [\#50](https://github.com/recurly/recurly-client-java/pull/50) ([bhelx](https://github.com/bhelx))

## [3.1.1](https://github.com/recurly/recurly-client-java/tree/3.1.1) (2019-12-10)
[Full Changelog](https://github.com/recurly/recurly-client-java/compare/3.1.0...3.1.1)

**Fixed bugs:**

- Convert Array params to CSV strings [\#49](https://github.com/recurly/recurly-client-java/pull/49) ([douglasmiller](https://github.com/douglasmiller))

**Merged pull requests:**

- Adding missing ShippingAddress\#object attribute [\#48](https://github.com/recurly/recurly-client-java/pull/48) ([bhelx](https://github.com/bhelx))

## [3.1.0](https://github.com/recurly/recurly-client-java/tree/3.1.0) (2019-11-19)
[Full Changelog](https://github.com/recurly/recurly-client-java/compare/3.0.0...3.1.0)

**Merged pull requests:**

- Release 3.1.0 [\#45](https://github.com/recurly/recurly-client-java/pull/45) ([bhelx](https://github.com/bhelx))
- Generated Updates for API version v2019-10-10 [\#44](https://github.com/recurly/recurly-client-java/pull/44) ([douglasmiller](https://github.com/douglasmiller))
- Generated Updates for API version v2019-10-10 [\#43](https://github.com/recurly/recurly-client-java/pull/43) ([bhelx](https://github.com/bhelx))

## [3.0.0](https://github.com/recurly/recurly-client-java/tree/3.0.0) (2019-10-07)
**Merged pull requests:**

- Fixing double forward slash in generated URLs [\#46](https://github.com/recurly/recurly-client-java/pull/46) ([douglasmiller](https://github.com/douglasmiller))
- Release 3.0.0 [\#42](https://github.com/recurly/recurly-client-java/pull/42) ([bhelx](https://github.com/bhelx))
- Upgrade API version v2019-10-10 [\#41](https://github.com/recurly/recurly-client-java/pull/41) ([bhelx](https://github.com/bhelx))
- Change base url to v3.recurly.com [\#40](https://github.com/recurly/recurly-client-java/pull/40) ([bhelx](https://github.com/bhelx))
- Some pom fixes [\#39](https://github.com/recurly/recurly-client-java/pull/39) ([bhelx](https://github.com/bhelx))
- Implement bump script [\#38](https://github.com/recurly/recurly-client-java/pull/38) ([bhelx](https://github.com/bhelx))
- Remove the site-id constraint from Client [\#37](https://github.com/recurly/recurly-client-java/pull/37) ([bhelx](https://github.com/bhelx))
- Specify transitive dependency versions [\#36](https://github.com/recurly/recurly-client-java/pull/36) ([aaron-suarez](https://github.com/aaron-suarez))
- Fix format script [\#34](https://github.com/recurly/recurly-client-java/pull/34) ([bhelx](https://github.com/bhelx))
- Javadoc [\#33](https://github.com/recurly/recurly-client-java/pull/33) ([bhelx](https://github.com/bhelx))
- Installing instructions [\#32](https://github.com/recurly/recurly-client-java/pull/32) ([bhelx](https://github.com/bhelx))
- SNAPSHOT needs to be optional for release [\#31](https://github.com/recurly/recurly-client-java/pull/31) ([bhelx](https://github.com/bhelx))
- Format code [\#30](https://github.com/recurly/recurly-client-java/pull/30) ([aaron-suarez](https://github.com/aaron-suarez))
- Test coverage [\#29](https://github.com/recurly/recurly-client-java/pull/29) ([aaron-suarez](https://github.com/aaron-suarez))
- Add V2 warning [\#28](https://github.com/recurly/recurly-client-java/pull/28) ([bhelx](https://github.com/bhelx))
- Add test for query params [\#27](https://github.com/recurly/recurly-client-java/pull/27) ([aaron-suarez](https://github.com/aaron-suarez))
- Add disclaimer to all generated files [\#25](https://github.com/recurly/recurly-client-java/pull/25) ([aaron-suarez](https://github.com/aaron-suarez))
- Prep needed for deployment [\#24](https://github.com/recurly/recurly-client-java/pull/24) ([bhelx](https://github.com/bhelx))
- Fix QueryParams [\#23](https://github.com/recurly/recurly-client-java/pull/23) ([aaron-suarez](https://github.com/aaron-suarez))
- Remove unused imports [\#22](https://github.com/recurly/recurly-client-java/pull/22) ([bhelx](https://github.com/bhelx))
- Add travis yaml file [\#21](https://github.com/recurly/recurly-client-java/pull/21) ([aaron-suarez](https://github.com/aaron-suarez))
- Add latest generated changes [\#20](https://github.com/recurly/recurly-client-java/pull/20) ([aaron-suarez](https://github.com/aaron-suarez))
- Add CONTRIBUTING.md [\#19](https://github.com/recurly/recurly-client-java/pull/19) ([bhelx](https://github.com/bhelx))
- Small fixes for Java Early Access [\#17](https://github.com/recurly/recurly-client-java/pull/17) ([aaron-suarez](https://github.com/aaron-suarez))
- Add generated changes to client [\#16](https://github.com/recurly/recurly-client-java/pull/16) ([aaron-suarez](https://github.com/aaron-suarez))
- Remove getUnsafeHttpClient in favor of a normal OkHttpClient [\#15](https://github.com/recurly/recurly-client-java/pull/15) ([aaron-suarez](https://github.com/aaron-suarez))
- Add QueryParams class [\#14](https://github.com/recurly/recurly-client-java/pull/14) ([aaron-suarez](https://github.com/aaron-suarez))
- Add information and examples [\#13](https://github.com/recurly/recurly-client-java/pull/13) ([aaron-suarez](https://github.com/aaron-suarez))
- Add pagination to the library [\#12](https://github.com/recurly/recurly-client-java/pull/12) ([aaron-suarez](https://github.com/aaron-suarez))
- Test making a request to the API [\#11](https://github.com/recurly/recurly-client-java/pull/11) ([aaron-suarez](https://github.com/aaron-suarez))
- Make datetime parsing as robust as possible [\#10](https://github.com/recurly/recurly-client-java/pull/10) ([aaron-suarez](https://github.com/aaron-suarez))
- Bug fixes [\#9](https://github.com/recurly/recurly-client-java/pull/9) ([aaron-suarez](https://github.com/aaron-suarez))
- No longer need dep scripts [\#8](https://github.com/recurly/recurly-client-java/pull/8) ([bhelx](https://github.com/bhelx))
- Add error handling [\#7](https://github.com/recurly/recurly-client-java/pull/7) ([aaron-suarez](https://github.com/aaron-suarez))
- Add test framework [\#6](https://github.com/recurly/recurly-client-java/pull/6) ([aaron-suarez](https://github.com/aaron-suarez))
- Refactor java generator [\#5](https://github.com/recurly/recurly-client-java/pull/5) ([bhelx](https://github.com/bhelx))
- Remove retrofit dependency [\#3](https://github.com/recurly/recurly-client-java/pull/3) ([aaron-suarez](https://github.com/aaron-suarez))
- V3 Update v2018-08-09 [\#2](https://github.com/recurly/recurly-client-java/pull/2) ([aaron-suarez](https://github.com/aaron-suarez))
- Need to install java if it does not exist [\#1](https://github.com/recurly/recurly-client-java/pull/1) ([bhelx](https://github.com/bhelx))



\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
9 changes: 8 additions & 1 deletion scripts/bump
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/usr/bin/env bash
set -e

bump2version "$@"
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
12 changes: 12 additions & 0 deletions scripts/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/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"
else
github_changelog_generator -t $GITHUB_TOKEN
fi
fi
36 changes: 36 additions & 0 deletions scripts/prepare-release
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/java-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
27 changes: 27 additions & 0 deletions scripts/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -e

# TODO this file could be gone
RELEASED_LOG="/tmp/java-pending-changes.md"
THIS_VERSION=$(./scripts/bump --this-version)

# Finally need to update the full changelog
./scripts/changelog
git add CHANGELOG.md
git commit -m "Update Changelog for Release $THIS_VERSION"
git push origin master

# publish
echo "mvn versions:set -DnewVersion=$THIS_VERSION"
echo "mvn clean package"
echo "mvn deploy"
echo "mvn versions:revert"

# create release
hub release create -c -F "$RELEASED_LOG" "$THIS_VERSION"

# Copy-pasteable messages for announcments
echo "Maven (Takes time to show up): https://search.maven.org/artifact/com.recurly.v3/api-client/$THIS_VERSION/jar"
echo "Release: https://github.com/recurly/recurly-client-java/releases/tag/$THIS_VERSION"
echo "Changelog:"
cat "$RELEASED_LOG"