Skip to content

Commit 143c184

Browse files
dragospaulp
authored andcommitted
Remove alphanumeric characters from the major part of the Scala version number.
In practice, this removes the 'v' in v2.10.0-M1-0168-g99844ebc10-2012-02-08. Why is this important, you ask? Many tools assume the version number to be composed of 3 numbers and a string qualifier. Eclipse is one of the tools that validates version numbers, and this string is used to stamp Scala IDE builds against Scala nightlies.
1 parent 69c2eb5 commit 143c184

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/get-scala-revision

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,8 @@ suffix="${described##${tag}-}"
3737
counter=$(echo $suffix | cut -d - -f 1)
3838
hash=$(echo $suffix | cut -d - -f 2)
3939

40-
# v2.10.0-M1-0098-g6f1c486d0b-2012-02-01
40+
# remove any alphabetic characters before the version number
41+
tag=$(echo $tag | sed "s/\([a-z_A-Z]*\)\(.*\)/\2/")
42+
43+
# 2.10.0-M1-0098-g6f1c486d0b-2012-02-01
4144
printf "%s-%04d-%s-%s\n" "$tag" "$counter" "$hash" $(date "+%Y-%m-%d")

0 commit comments

Comments
 (0)