mystamps icon indicating copy to clipboard operation
mystamps copied to clipboard

Document release procedure

Open php-coder opened this issue 6 years ago • 1 comments

The process of creating a new release should be documented.

Here is the list of the steps to be executed (within master branch):

  • create a new commit
    • bump version in NEWS.txt
    • bump version in pom.xml (remove -SNAPSHOT: ./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion=x.y.z)
    • bump version in ResourceUrl.RESOURCES_VERSION
    • bump version in src/main/frontend/package.json and src/main/frontend/package-lock.json
    • set version in infra/docker/docker-compose.yml
    • set version in infra/kubernetes/deployment.yml
    • git commit -a -m 'chore: release of x.y.z version'
  • create and publish a new git tag (git tag -a x.y.z -m x.y.z && git push --follow-tags)
  • push changes to the prod branch and deploy to production (git checkout prod; git merge master; git push; git checkout -)
  • close the corresponding milestone on GitHub
  • create a new release on GitHub for a just added tag from the following template:
🚀 New Features
- none

:star: Improvements
- none

🐞 Bugs Fixed
- none

💥 Breaking Changes
- none

📖 Documentation Updates
- none

🔨 Internal Changes
- none

:page_facing_up: Other Changes
- none

Empty sections should be removed and every item should have a link to a related issue. Use git log --oneline x.y.z..x.y.z+1 for getting a list of the changes.

  • publish Docker image to DockerHub (and check on https://hub.docker.com/r/phpcoder/mystamps/tags):
    ./mvnw clean
    ./mvnw package dockerfile:build dockerfile:tag -Ddockerfile.tag=x.y.z
    docker login -u phpcoder
    vim ~/.docker/config.json # empty "auths" object
    ./mvnw dockerfile:push
    docker tag phpcoder/mystamps:x.y.z phpcoder/mystamps:latest
    ./mvnw dockerfile:push -Ddockerfile.tag=latest
    docker rmi phpcoder/mystamps:x.y.${z-1}
    
  • pom.xml: set version to x.y.{$z+1}-SNAPSHOT: ./mvnw versions:set -DgenerateBackupPoms=false -DnextSnapshot=true
  • create an empty migration file for new version (to avoid regression like we had in #1265)
  • git commit -a with a message chore: update version for development\n[skip ci]
  • git push

php-coder avatar Jun 15 '19 16:06 php-coder

Tool Cons Pros
peritus/bumpversion
  • is no longer maintained
  • c4urself/bump2version (fork of bumpversion)
  • is no longer maintained
  • it doesn't support regexps, so it's impossible to replace 0.4.8-SNAPSHOT => 0.4.8 (where 0.4.8. is the new version)
  • always rewrite its own config file
  • callowayproject/bump-my-version (fork of bump2version)
  • I couldn't configure it to update pom.xml where the next version is used
  • support regexps
  • mbarkhau/bumpver
  • it's impossible to specify a pattern as regexp (so we can't update 0.4.7.1 => 0.4.8.0 as it has additional section that should be resetted to zero during update) (can be workarounded with pre_commit_hook and sed)
  • there is no way to provide a replacement text (so we can't update 0.4.8-SNAPSHOT => 0.4.8 or 0.x (upcoming release) => 0.4.8)
  • it does git fetch --tags
  • it can push the changes
  • php-coder avatar Dec 12 '23 10:12 php-coder