From 42ab1b47aaab794ec0dfefbb1c05a735f3a79e6e Mon Sep 17 00:00:00 2001 From: gcarron <gcarron@grandlyon.com> Date: Fri, 29 Jul 2022 10:54:26 +0200 Subject: [PATCH] feat: add annotated tag doc --- docs/ecolyo/application/release.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/ecolyo/application/release.md b/docs/ecolyo/application/release.md index b79b9ef..c233049 100644 --- a/docs/ecolyo/application/release.md +++ b/docs/ecolyo/application/release.md @@ -46,6 +46,30 @@ git push --follow-tags origin dev Don't forget to add release notes in gitlab in *your project -> repository -> tags -> edit release notes * You can copy paste the last changelogs in the release notes. +### Anotated Tags + +If you see a bug in the Changelog (the last version doesn't compare without the previous version correctly or you have plenty of undesired commits from previous versions), it means you made something wrong when you pushed your commit (basically you may have made a classical git push instead of git push --follow-tags origin dev), and you tag is not correctly annotated or annotated with the wrong commit. + +You can list the annotated tag with the following command + +``` +git tag -n +``` + +A normal tag should have its related commit like this : + +``` +v2.1.3 chore(release): 2.1.3 +v2.2.0 chore(release): 2.2.0 +``` + +If you see some mistakes in tag annotation you can change it with the following command : + +``` +git tag -a v2.1.3 COMMIT_SHA -m 'chore(release): 2.1.3' -f +``` + +This command will annotate an existing tag (v2.1.3 with chore(release): 2.1.3 here) to the right commit. You'll have to pass the commit_sha from the related chore commit. ## Useful links [Conventional commit doc](https://www.conventionalcommits.org/en/v1.0.0/) -- GitLab