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
minor
major
snapshot
Docs update
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