-
Notifications
You must be signed in to change notification settings - Fork 33
Developer Guide
This section of the wiki contains information relevant to developers wishing to contribute to the project or to extend the framework.
Please use our coding style guidelines, as described in CJSCommonPlatform/styleguide. That project also includes settings files for commonly used editors.
-
Ensure the pom files do not reference SNAPSHOT versions of dependencies.
-
Update the CHANGELOG.md file ready for the new release.
-
Run the following command to perform the release using maven, ensure that you set the new and next release versions appropriately depending on the scope of the release (e.g. bug fixes, new features or fundamental modifications).
mvn versions:set -DnewVersion=<release.version> versions:commit && git commit . -m 'Update to <release.version> for release' && git tag -a release-<release.version> -m 'Release <release.version>' && mvn versions:set -DnewVersion=<next.version>-SNAPSHOT versions:commit && git commit . -m 'Update to <next.version>-SNAPSHOT for development'
-
Push the newly create tag and then wait for a few minutes to ensure the Continuous Integration build starts.
git push --tags
-
Push all changes to the repository.
git push
-
Update the Release Notes by copying the information from the CHANGELOG.md, see the previous release notes for desired format.
Here is a small script that will compose and run the release command for you (step 3.).
To run: release <release.version> <next.version>
#!/bin/bash
if [ -z "$2" ]
then
echo "Usage: release <release.version> <next.version>"
exit 1
fi
MAGENTA=$(tput setaf 5)
CYAN=$(tput setaf 6)
RED='\033[0;31m'
NO_COLOUR='\033[0m'
command="mvn versions:set -DnewVersion=$1 versions:commit && git commit . -m 'Update to $1 for release' && git tag -a release-$1 -m 'Release $1' && mvn versions:set -DnewVersion=$2-SNAPSHOT versions:commit && git commit . -m 'Update to $2-SNAPSHOT for development'"
echo
printf "${CYAN}Release version:\t${MAGENTA}$1${NO_COLOUR}\n"
printf "${CYAN}Next version:\t\t${MAGENTA}$2-SNAPSHOT${NO_COLOUR}\n"
echo
printf "${CYAN}Release command:${NO_COLOUR}\n"
printf "${RED}$command${NO_COLOUR}\n"
echo
read -p "Execute this command [y/n]? " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
eval $command
fi