- bash terminal
- git version control
- checkout this repo
- copy all *.sh files into your project
- adjust
hooks.sh
for your project environment
- Perform this steps in terminal:
$ git submodule add https://github.com/borisskert/release-scripts release-scripts
$ cp release-scripts/.hooks-default.sh .release-scripts-hooks.sh
- adjust
.release-scripts-hooks.sh
for your project environment
$ ./release.sh <release-version> <next snapshot/beta version>
# Perform next steps the script is telling
$ ./hotfix_start.sh <hotfix-version>
# commit and push your work into the hotfix-branch
$ ./hotfix_finish.sh <hotfix-version> <current snapshot/beta version>
$ ./revert_release <release-version>
If you need to make releases from support branches and also from develop, take care to adjust your hooks to calculate master and develop branches according to versions.
Example: For releasing versions that start with 12.
, i.e. 12.2
we'll use support-12.x
branch, otherwise develop
branch:
function get_develop_branch_name {
if [[ "$1" =~ ^12\..* ]]
then
echo "support-12.x"
else
echo "develop"
fi
}
function get_master_branch_name {
if [[ "$1" =~ ^12\..* ]]
then
echo "master-12.x"
else
echo "master"
fi
}
- Install bats-core
- Go to tests directory
- Run
bats *.bats
$ shellcheck *.sh
Make sure you have installed shellcheck on your system.