Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !3110

Release versioning helper script(s)

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Jim Schubert requested to merge github/fork/jimschubert/release-versioning-helper into master Jun 06, 2019
  • Overview 0
  • Commits 15
  • Pipelines 0
  • Changes 22

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.
  • Filed the PR against the correct branch: master, 4.1.x, 5.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

This is an attempt to make the release versioning scripts a little clearer. I've moved the scripts under ./bin/utils/release so they can live alongside related/supplemental scripts.

Rather than requiring release engineers to specify from/to target versions, I've made release_version_update.sh accept one of major, minor, build, or snapshot. This pulls the version from pom.xml. We could go one step further and if version ends in -SNAPSHOT then default to build and if not default to snapshot for the bump version type.

If this gets merged, we'd need to update the wiki as well.

Examples

build

image

minor

image

major

image

snapshot

image

Docs update

image

Options

release_version_update.sh

$ ./bin/utils/release/release_version_update.sh -h

USAGE: ./bin/utils/release/release_version_update.sh target

  This script will convert the current version in target files to the specified 'target'
  where target is one of:

  major
  minor
  build
  snapshot

EXAMPLES:

Update to new snapshot (1.0.0 -> 1.0.1-SNAPSHOT):
    ./bin/utils/release/release_version_update.sh snapshot
Update build version (1.0.0 -> 1.0.1)
    ./bin/utils/release/release_version_update.sh build
Update minor version (1.2.3 -> 1.3.0)
    ./bin/utils/release/release_version_update.sh minor
Update major version (1.2.3 -> 2.0.0)
    ./bin/utils/release/release_version_update.sh major

release_version_update_docs.sh

$ ./bin/utils/release/release_version_update_docs.sh -h

USAGE: ./bin/utils/release/release_version_update_docs.sh version target

  This script will convert the specified version in DOC target files to the 'target'
  where target is one of:

      major
      minor
      build

  or an explicitly defined version number.

NOTE:

  Files prepped by this script should never target SNAPSHOT, as the docs should refer to release artifacts.
  If intending to update to/from snapshots, please add target files to release_version_update.sh instead.

EXAMPLES:

Update build version (1.0.0 -> 1.0.1)
    ./bin/utils/release/release_version_update_docs.sh 1.0.0 build
Update minor version (1.2.3 -> 1.3.0)
    ./bin/utils/release/release_version_update_docs.sh 1.2.3 minor
Update major version (1.2.3 -> 2.0.0)
    ./bin/utils/release/release_version_update_docs.sh 1.2.3 major
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jimschubert/release-versioning-helper