Get the version out of project/build.properties.

This commit is contained in:
Paul Phillips 2011-08-25 11:56:33 -07:00
parent c922e084c0
commit 41311fcecd
1 changed files with 11 additions and 1 deletions

12
sbt
View File

@ -12,7 +12,17 @@ sbt_snapshot_version=0.11.0-20110825-052147
# Falses made true via command line options
useSnapshot=0
createProject=0
sbt_version=
sbt_version=$(
if [[ -f project/build.properties ]]; then
versionLine=$(grep ^sbt.version project/build.properties)
versionString=${versionLine##sbt.version=}
if [[ $versionString =~ ^[0-9]\.[0-9]\.[0-9]$ ]]; then
echo "$versionString"
fi
fi
)
echo $sbt_version
jar_url () {
local where=$1 # releases or snapshots