File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1010
1111[[ $# -eq 0 ]] || cd " $1 "
1212
13+ ensure_tag () {
14+ # v2.10.0-M1
15+ fallback=58cb15c40d
16+ [[ -n $( git tag -l v2.10.0-M1) ]] || {
17+ git tag -a -m " generated by get-scala-revision" v2.10.0-M1 $fallback
18+ }
19+ }
20+ ensure_tag
21+
1322# the closest tag, obtained separately because we have to
1423# reconstruct the string around the padded distance.
15- tag=$( git describe --abbrev=0)
24+ tag=$( git describe --match ' v2* ' -- abbrev=0)
1625
1726# the full string - padding correctness depends on abbrev=10.
18- described=$( git describe --abbrev=10 --always --tags )
27+ described=$( git describe --match ' v2* ' --abbrev=10 )
1928suffix=" ${described## ${tag} -} "
2029counter=$( echo $suffix | cut -d - -f 1)
2130hash=$( echo $suffix | cut -d - -f 2)
You can’t perform that action at this time.
0 commit comments