summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2012-02-08 14:17:47 +0100
committerPaul Phillips <paulp@improving.org>2012-02-08 11:04:36 -0800
commit143c184c4df1ee9da37187f294bc7431b4b1f33c (patch)
tree7280f8eefc0586174e92d6ccfc83ddc722248dcd
parent69c2eb5ad21848ab6b326c71c157288432e6a9f5 (diff)
downloadscala-143c184c4df1ee9da37187f294bc7431b4b1f33c.tar.gz
scala-143c184c4df1ee9da37187f294bc7431b4b1f33c.tar.bz2
scala-143c184c4df1ee9da37187f294bc7431b4b1f33c.zip
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.
-rwxr-xr-xtools/get-scala-revision5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/get-scala-revision b/tools/get-scala-revision
index 8747fdc3fb..4d97ec58ad 100755
--- a/tools/get-scala-revision
+++ b/tools/get-scala-revision
@@ -37,5 +37,8 @@ suffix="${described##${tag}-}"
counter=$(echo $suffix | cut -d - -f 1)
hash=$(echo $suffix | cut -d - -f 2)
-# v2.10.0-M1-0098-g6f1c486d0b-2012-02-01
+# remove any alphabetic characters before the version number
+tag=$(echo $tag | sed "s/\([a-z_A-Z]*\)\(.*\)/\2/")
+
+# 2.10.0-M1-0098-g6f1c486d0b-2012-02-01
printf "%s-%04d-%s-%s\n" "$tag" "$counter" "$hash" $(date "+%Y-%m-%d")