Search code examples
gitjenkinswildcardgit-diff

git log between tags using wildcards


Jenkins tags every build with a tag that looks like this:

builds/Android_release/1.2-RC1_2016-10-07-16

when building a second RC, I would like to get the diff between the two builds. Something like:

git shortlog builds/Android_release/1.2-RC1*..builds/Android_release/1.2-RC2*

Unfortunately, wildcards do not work in the range.

How can I achieve this?


Solution

  • What about to do something like this:

    tag1=$(git tag | grep 1.2-RC1)
    tag2=$(git tag | grep 1.2-RC2)
    git shortlog $tag1..$tag2