Skip to content
William Cheng edited this page Jul 8, 2018 · 35 revisions

Before Release

  • Add a quick announcement on the Gitter channel (one day before)

  • Update dependencies if needed (swagger-core, swagger-parser versions...). (e.g. #4889). If you change this, please performs some tests to ensure that nothing is broken after the update.

  • Review milestones to ensure there are no outstanding issues/PRs that need to be urgently addressed before the release.

  • Check for merged PRs without milestone (Search query is:pr is:merged no:milestone - link). Each merged PR should have a milestone defined.

  • Create the next milestone (e.g. 3.0.3 if the current version is 3.0.2-SNAPSHOT)

  • Update open PRs & issues of the current milestone (e.g. 3.0.2) to the next milestone (3.0.3), here are the steps:

    • Go to the Milestones list
    • Select the current milestone (3.0.2)
    • After the page loading completes (which show all issues and PR for the milestone 3.0.2), click on the checkbox next to the "open" counter.
    • Click on the drop-down menu "Milestones" to change the milestones of these selected issues to 3.0.3
    • (Repeat until all issues have been updated with the new milestones -- in case of multiple pages)
  • File a PR: (e.g. #280)

    • to remove the SNAPSHOT version (script bin/utils/release_version_update.sh can be used, e.g. bin/utils/release_version_update.sh 3.0.2-SNAPSHOT 3.0.2)
    • to update the OpenAPI Generator Online's Dockerfile to use the stable version. (script bin/utils/release_version_update.sh can be used)
    • to disable bin/ensure-up-to-date.sh in shippable for the time being.

Release

  • merge the "prepare release" PR
  • git tag the merged commit
  • publish the release notes

The CI (travis) will perform:

  • push the JAR to maven repository (automatically done by the CI)
  • push the Docker images to DockerHub.com (automatically done by the CI)
  • add tag (e.g. 2.3.0) to docker image in Docker Hub (done automatically by CI)

Input for the Release notes:

  • use the same format (e.g. ## General)
  • for PRs related to generators, sort them alphabetically

Draft release in GitHub can be used for internal review with the team.

Checks

Check status of the tag build on travis CI.

Tests:

What to check:

How to check:

  • run ruby ./bin/utils/release_checkout.rb 3.1.0 (example) and the result looks like the following:
Running checkout on OpenAPI Generator release 3.1.0
Checking homebrew forumla ... [OK]
Checking openapi-generator JAR ... [OK]
Checking openapi-generator-cli JAR ... [OK]
Checking openapi-generator-maven-plugin JAR ... [OK]
Checking openapi-generator-gradle-plugin JAR ... [OK]
Checking openapi-generator-online JAR ... [OK]
Checking openapi-generator-project pom.xml ... [OK]
Checking openapi-generator README.md ... [OK]
Checking openapi-generator-online docker ... [OK]
Checking openapi-generator-cli docker ... [OK]

(Note: the release checkout script may not catch every possible edge cases and will need further enhancement to take care of those situations)

After Release

  • File a PR "Prepare next snapshot version":

    • update versions to next SNAPSHOT version (e.g. #285). Script bin/utils/release_version_update.sh can be used. Be careful this script creates changes that need to be reverted.
    • re-enable bin/ensure-up-to-date and update the Petstore samples accordingly
    • update root README.md: (e.g. 167b2f5, 1029b69)
      • Update the release table
      • mention the last released version in Section "1.3 - Download JAR"
    • update OpenAPI Generator Maven Plugin README (modules/openapi-generator-maven-plugin/README.md): mention the last release version in the xml snippet <version>..</version> (e.g. 9c79297)
    • update OpenAPI Generator Gradle Plugin README (modules/openapi-generator-gradle-plugin/README.adoc): mention the last release version in the dependencies section.
    • update the Gradle Example Plugin README (modules/openapi-generator-gradle-plugin/samples/local-spec/README.md): update -PopenApiGeneratorVersion in the bash snippet
  • update Homebrew formula to use the latest version, e.g. https://github.com/Homebrew/homebrew-core/pull/29164/commits/21c808cf733d42581e1a4a096828c1996ca314e2

  • update https://generator.swagger.io to run the latest version of OpenAPI Generator

  • close the released milestone (see milestones view)

  • Announcements:

    • use Twitter account "oas_generator" to announce the new release
    • gitter channel