Documentation on basic versioning strategy (as of March 2017)
The develop branch of the git repository is where features are pushed and deployed to DEV for testing.
NOTE: When doing this process, make sure that eclipse is closed! This process can be run with a combination of cygwin and tortoise git.
The develop branch should always be one minor version ahead of master. For example
When it comes time to deploy features to PROD/UAT, the master branch needs to be updated/synchronized before that happens.
The basic process is this:
Use "mvn versions:set" to change the versions of the develop branch to the next release version (e.g. 1.3.2)
cd /path/to/OTF-Mapping-Service mvn versions:set ... when prompted, type in the next version (e.g. 1.3.2) cd parent/ mvn versions:set ... when prompted type in the next version (e.g. 1.3.2) ... Note: If you make a mistake, use mvn versions:revert. |
Use "mvn versions:set" to change the versions to the next develop version
cd /path/to/OTF-Mapping-Service mvn versions:set ... when prompted, type in the next version (e.g. 1.3.3-SNAPSHOT) cd parent/ mvn versions:set ... when prompted type in the next version (e.g. 1.3.3-SNAPSHOT) |
NOTE: Confirm that pom-us.xml also gets versioned appropriately. If not, update manually.
NOTE: you may notice the complexity of running versions:set twice. This is because of the split nature of the parent and aggregator modules. It is recommended in the future that parent project be merged into the aggregator and removed. Thant involves:
Occasionally, only a select few commits from develop need to be deployed on production as a hotfix. In these cases, the full merging from develop to master is inappropriate, and the following steps should be followed instead:
Use "mvn versions:set" to change the versions of the master branch. For hotfixes, the convention is to add an underscore+letter to the current version. e.g. If the current version is 1.5.2, then update the version to 1.5.2_a. If another hotfix is deployed before the next full merge from develop into master, increment the letter to 1.5.2_b, and so on.
cd /path/to/OTF-Mapping-Service mvn versions:set ... when prompted, type in the version plus the hotfix suffix (e.g. 1.5.2_a) cd parent/ mvn versions:set ... when prompted type in the version plus the hotfix suffix (e.g. 1.5.2_a) ... Note: If you make a mistake, use mvn versions:revert. |
NOTE: For hotfixes, no version changing is done on the develop branch. So in the above example, the develop version will remain at "1.5.2-SNAPSHOT".
NOTE: As with standard merges, confirm that pom-us.xml also gets versioned appropriately. If not, update manually.
Whether for a full deployment or a hot fix, whenever code is versioned and deployed to production, create a release notes page to document the update.