diff --git a/BRANCHING_RELEASE_STRATEGY.md b/BRANCHING_RELEASE_STRATEGY.md index 3521caa..5e9f6fc 100644 --- a/BRANCHING_RELEASE_STRATEGY.md +++ b/BRANCHING_RELEASE_STRATEGY.md @@ -137,15 +137,39 @@ $ git checkout main $ git pull ``` +Verify that you don't use a RC or SNAPSHOT version for the PowSyBl dependencies. +Using the following command, you should only have your repo version: +```shell +$ git grep -B2 -E "SNAPSHOT|-RC" pom.xml | less +$ # You should not have RC or SNAPSHOT versions (except your own repo's one) +``` +If it is not the case, then the bump of the dependencies should be done prior to releasing. + Create your temporary branch preparing to the release X.Y.0 and add a commit bumping to your release version. ```shell $ git checkout -b tmp_prepare_release $ mvn versions:set -DnewVersion=X.Y.0 $ git commit -s -a -S -m "Bump to vX.Y.0" $ git push -u origin tmp_prepare_release +$ # Then create a PR for tmp_prepare_release +``` + +Create a pull request from your temporary branch into the `main` branch. +In its description, use the following message (don't forget to change the vX.Y.0 by your version number): +```markdown +**Please check if the PR fulfills these requirements** + +- [X] The commit message follows our guidelines + + +**What kind of change does this PR introduce?** + +Prepare release vX.Y.0 + +**Other information**: +:warning: **DO NOT** squash the commits, merge with fast-forward locally ``` -Create a pull request from your temporary branch into the `main` branch. Wait until all the CI criteria are fully validated. Then add a commit for your next snapshot version. You can then push again. @@ -159,6 +183,7 @@ Tag another maintainer as a reviewer to your pull request so they can approve it Once it is approved, locally merge it by following these steps: ```shell +$ # The PR should be reviewed and approved $ git checkout main $ git pull $ git merge --ff tmp_prepare_release @@ -166,6 +191,8 @@ $ git push ``` After that, create your tag: ```shell +$ git log --oneline -2 +$ # Retrieve the commit hash of the second line, and use it in the following instruction $ git tag -s vX.Y.0 $ git push origin vX.Y.0 ``` @@ -181,7 +208,11 @@ Please make sure that your release note is comprehensive to all new features and On your repository, checkout to the release tag. You can then package and deploy your release: ```shell +$ git status +$ # Your local repository should be clean $ git checkout tags/vX.Y.0 +$ git log --oneline -1 +$ # Check that the last commit is indeed the "Bump to X.Y.0" commit $ mvn dependency:purge-local-repository $ mvn clean package -Prelease $ mvn deploy -Prelease -DskipTests