diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2022-01-19 15:33:10 +0100 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2022-01-19 15:41:08 +0100 |
commit | 64e2126a3b7259b6634b4511c62a499579be1cd6 (patch) | |
tree | b5db8eb1079fa42079c6e5e42f590e3406e24c27 | |
parent | 88b05dc840390a17d085c7d82a409f689f29c1a3 (diff) |
release.sh: Add new option --from-tag
With Xwayland and Xorg build from different branches sharing the same
master branch, using `git describe` to find the last tag may give the
wrong tag, and the resulting git short log will be wrong.
Add a new command line option '--from-tag' to pass the last known
applicable tag to use for generating the short log in the announce.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-rwxr-xr-x | release.sh | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -751,7 +751,11 @@ process_module() { # Git-describe returns only "the most recent tag", it may not be the expected one # However, we only use it for the commit history which will be the same anyway. - tag_previous=`git describe --abbrev=0 HEAD^ 2>/dev/null` + if [ x"$FROM_TAG" != x ]; then + tag_previous=$FROM_TAG + else + tag_previous=`git describe --abbrev=0 HEAD^ 2>/dev/null` + fi # Git fails with rc=128 if no tags can be found prior to HEAD^ if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then @@ -822,6 +826,7 @@ Options: --moduleset <file> The jhbuild moduleset full pathname to be updated --no-quit Do not quit after error; just print error message --user <name>@ Username of your fdo account if not configured in ssh + --from-tag <tag> Generate logs since tag Environment variables defined by the "make" program and used by release.sh: MAKE The name of the make command [make] @@ -919,6 +924,11 @@ do shift USER_NAME=$1 ;; + --from-tag) + check_option_args $1 $2 + shift + FROM_TAG=$1 + ;; --*) echo "" echo "Error: unknown option: $1" |