Simplifying release procedure
This commit is contained in:
parent
4c16fc52f7
commit
142e1bade4
2 changed files with 2 additions and 49 deletions
|
@ -522,8 +522,8 @@ cd test
|
|||
Feel free to ask questions in chat, open issues, or contribute by creating pull requests.
|
||||
|
||||
In order to create a pull request
|
||||
* checkout develop branch
|
||||
* introduce your changes
|
||||
* checkout master branch
|
||||
* introduce your changes & bump version
|
||||
* submit pull request
|
||||
|
||||
# Resources
|
||||
|
|
47
release.sh
47
release.sh
|
@ -1,47 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
version=$(cat .version)
|
||||
|
||||
release_version=${version%%-SNAPSHOT}
|
||||
new_version=$(echo $release_version+0.1 | bc)
|
||||
|
||||
[[ $? -ne 0 ]] && echo 'Error exiting.' && exit 1
|
||||
|
||||
snapshot_version=${new_version}-SNAPSHOT
|
||||
|
||||
cat <<EOF
|
||||
|
||||
current version : $version
|
||||
release version : $release_version
|
||||
new snapshot version: $snapshot_version
|
||||
|
||||
EOF
|
||||
|
||||
git fetch
|
||||
|
||||
echo start the release by creating a new release branch
|
||||
|
||||
git checkout -b release/$release_version origin/develop
|
||||
echo $release_version > ./.version
|
||||
git add ./.version
|
||||
git commit -m "[release] prepare release v$release_version"
|
||||
git tag v$release_version
|
||||
echo $snapshot_version > ./.version
|
||||
git add ./.version
|
||||
git commit -m "[release] prepare for next development iteration"
|
||||
|
||||
echo merge the version back into develop
|
||||
git checkout develop
|
||||
git merge --no-ff -m "[release] merge release/$release_version into develop" release/$release_version
|
||||
|
||||
git checkout master
|
||||
echo merge the version back into master but use the tagged version instead of the release/$releaseVersion HEAD
|
||||
git merge --no-ff -m "[release] merge previous version into master to avoid the increased version number" release/$release_version~1
|
||||
|
||||
echo get back on the develop branch
|
||||
git checkout develop
|
||||
echo finally push everything
|
||||
git push origin develop master
|
||||
git push --tags
|
||||
echo removing the release branch
|
||||
git branch -D release/$release_version
|
Loading…
Reference in a new issue