From a10ef1ae4f5b2a8715ac96e4230a6033b9ccd874 Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Thu, 15 Mar 2012 14:22:09 +0100 Subject: Remove confusing nightly.checkinit target that was setting checkinit in optimise params --- build.xml | 6 ------ 1 file changed, 6 deletions(-) (limited to 'build.xml') diff --git a/build.xml b/build.xml index 0a3f7e782f..de28304858 100644 --- a/build.xml +++ b/build.xml @@ -2077,12 +2077,6 @@ FORWARDED TARGETS FOR NIGHTLY BUILDS - - - - - - -- cgit v1.2.3 From c3bff042546a343f260e2ef8be01665671db1043 Mon Sep 17 00:00:00 2001 From: Josh Suereth Date: Wed, 14 Mar 2012 01:04:45 -0400 Subject: Fixes to build numbering system for 2.9.x release Conflicts: build.number build.xml --- build.number | 7 +++++++ build.xml | 41 +++++++++++++++++++++++++++++++++++++++-- tools/get-scala-revision | 4 ++-- tools/get-scala-revision.bat | 5 +++++ 4 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 build.number (limited to 'build.xml') diff --git a/build.number b/build.number new file mode 100644 index 0000000000..4c8b62076d --- /dev/null +++ b/build.number @@ -0,0 +1,7 @@ +#Tue Sep 11 19:21:09 CEST 2007 +version.major=2 +version.minor=9 +version.patch=2 + +# Note: To build a release run ant with -Dbuild.release=true +# To build an RC, run ant with -Dmaven.version.suffix=-RCN diff --git a/build.xml b/build.xml index f0fd36da5a..20f953cd4f 100644 --- a/build.xml +++ b/build.xml @@ -236,7 +236,19 @@ INITIALISATION - + + + + + + + + + + + + + + + + + + + @@ -270,7 +294,7 @@ INITIALISATION - + @@ -293,7 +317,20 @@ INITIALISATION +<<<<<<< HEAD +======= + + + + + + + + + + +>>>>>>> 6ec24f1611... Fixes to build numbering system for 2.9.x release diff --git a/tools/get-scala-revision b/tools/get-scala-revision index 4d97ec58ad..14c84d0ad4 100755 --- a/tools/get-scala-revision +++ b/tools/get-scala-revision @@ -40,5 +40,5 @@ hash=$(echo $suffix | cut -d - -f 2) # 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") +# 20120324-123-b0d78f7b9c +printf "%s-%04d-%s\n" $(date "+%Y%m%d") "$counter" "$hash" diff --git a/tools/get-scala-revision.bat b/tools/get-scala-revision.bat index 48c7cbd94f..b5b30eb3a8 100644 --- a/tools/get-scala-revision.bat +++ b/tools/get-scala-revision.bat @@ -14,9 +14,14 @@ if "%*"=="" ( ) cd %_DIR% +rem TODO - Look up bat scripting example and fix the darn string. if exist .git\NUL ( git describe --abbrev=10 --always --tags ) +rem Implement something like the following +rem for /f "tokens=1,2,3 delims=- " %%a in ("%gitdescribe%") do set version=%%a&set commits=%%b&set sha=%%c +rem echo %date?%-%commits%-%sha% + :end @endlocal -- cgit v1.2.3 From 0574a3fa71b62eca54e6bf63c8d2cd19afb4c336 Mon Sep 17 00:00:00 2001 From: Josh Suereth Date: Wed, 14 Mar 2012 09:03:38 -0400 Subject: Moved to Mirco's versioning idea. Conflicts: build.xml --- build.number | 2 ++ build.xml | 28 +++++++++++++++++----------- 2 files changed, 19 insertions(+), 11 deletions(-) (limited to 'build.xml') diff --git a/build.number b/build.number index 4c8b62076d..e5a19b9b7e 100644 --- a/build.number +++ b/build.number @@ -2,6 +2,8 @@ version.major=2 version.minor=9 version.patch=2 +# This is the -N part of a version. if it's 0, it's dropped from maven versions. +version.bnum=0 # Note: To build a release run ant with -Dbuild.release=true # To build an RC, run ant with -Dmaven.version.suffix=-RCN diff --git a/build.xml b/build.xml index 20f953cd4f..3bc905887e 100644 --- a/build.xml +++ b/build.xml @@ -166,6 +166,8 @@ PROPERTIES + + @@ -237,16 +239,27 @@ INITIALISATION + + + + + - + - - + + + + + + + - + @@ -275,9 +288,6 @@ INITIALISATION - - - -<<<<<<< HEAD - -======= @@ -330,7 +337,6 @@ INITIALISATION ->>>>>>> 6ec24f1611... Fixes to build numbering system for 2.9.x release -- cgit v1.2.3 From 08778f747d18a98b6fd80738ad87613be946e142 Mon Sep 17 00:00:00 2001 From: Josh Suereth Date: Wed, 14 Mar 2012 09:12:00 -0400 Subject: Modified build for new versioning scheme. --- build.xml | 6 ++++++ src/build/maven/maven-deploy.xml | 6 +++--- src/build/pack.xml | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'build.xml') diff --git a/build.xml b/build.xml index 3bc905887e..1b92893b5d 100644 --- a/build.xml +++ b/build.xml @@ -401,6 +401,7 @@ LOCAL REFERENCE BUILD (LOCKER) + @@ -440,6 +441,7 @@ LOCAL REFERENCE BUILD (LOCKER) + @@ -671,6 +673,7 @@ QUICK BUILD (QUICK) + @@ -730,6 +733,7 @@ QUICK BUILD (QUICK) + @@ -1212,6 +1216,7 @@ BOOTSTRAPPING BUILD (STRAP) + @@ -1251,6 +1256,7 @@ BOOTSTRAPPING BUILD (STRAP) + diff --git a/src/build/maven/maven-deploy.xml b/src/build/maven/maven-deploy.xml index 2e490163e0..ea9026a766 100644 --- a/src/build/maven/maven-deploy.xml +++ b/src/build/maven/maven-deploy.xml @@ -246,7 +246,7 @@ - + @@ -255,7 +255,7 @@ - + @@ -263,6 +263,6 @@ - + diff --git a/src/build/pack.xml b/src/build/pack.xml index 1b0cf19151..0b3cee563a 100644 --- a/src/build/pack.xml +++ b/src/build/pack.xml @@ -315,6 +315,7 @@ MAIN DISTRIBUTION SBAZ + - - - + + - + @@ -280,6 +280,15 @@ INITIALISATION + + + + + + + + + @@ -289,13 +298,16 @@ INITIALISATION + - + value="${maven.version.number}-${git.commit.date}-${git.commit.drift}-${git.commit.sha}"/> + name="osgi.version.number" + value="${version.major}.${version.minor}.${version.patch}.r${git.commit.date}${version.suffix}-${git.commit.sha}"/> + @@ -334,7 +346,8 @@ INITIALISATION - + + @@ -402,6 +415,7 @@ LOCAL REFERENCE BUILD (LOCKER) + @@ -442,6 +456,7 @@ LOCAL REFERENCE BUILD (LOCKER) + @@ -674,6 +689,7 @@ QUICK BUILD (QUICK) + @@ -734,6 +750,7 @@ QUICK BUILD (QUICK) + @@ -1217,6 +1234,7 @@ BOOTSTRAPPING BUILD (STRAP) + @@ -1257,6 +1275,7 @@ BOOTSTRAPPING BUILD (STRAP) + diff --git a/src/library/scala/util/Properties.scala b/src/library/scala/util/Properties.scala index 3ba803712d..38ca89b98b 100644 --- a/src/library/scala/util/Properties.scala +++ b/src/library/scala/util/Properties.scala @@ -101,8 +101,7 @@ private[scala] trait PropertiesTrait { /** The version number of the jar this was loaded from plus "version " prefix, * or "version (unknown)" if it cannot be determined. */ - val versionString = "version " + scalaPropOrElse("version.number", "(unknown)") + - scalaPropOrNone("maven.version.number").map(v => "(" + v + ")").getOrElse("") + val versionString = "version " + scalaPropOrElse("version.number", "(unknown)") val copyrightString = scalaPropOrElse("copyright.string", "(c) 2002-2011 LAMP/EPFL") /** This is the encoding to use reading in source files, overridden with -encoding diff --git a/tools/get-scala-commit-date b/tools/get-scala-commit-date new file mode 100755 index 0000000000..ef5b0f540d --- /dev/null +++ b/tools/get-scala-commit-date @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# Usage: get-scala-commit-date [dir] +# Figures out current commit date of a git clone. +# If no dir is given, current working dir is used. +# +# Example build version string: +# 20120312 +# + +[[ $# -eq 0 ]] || cd "$1" + +lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1) + +# 20120324 +echo "${lastcommitdate//-/}" diff --git a/tools/get-scala-commit-date.bat b/tools/get-scala-commit-date.bat new file mode 100644 index 0000000000..a07155533f --- /dev/null +++ b/tools/get-scala-commit-date.bat @@ -0,0 +1,24 @@ +@echo off +rem +rem Usage: get-scala-revison.bat [dir] +rem Figures out current scala commit date of a git clone. +rem +rem If no dir is given, current working dir is used. + +@setlocal +set _DIR= +if "%*"=="" ( + for /f "delims=;" %%i in ('cd') do set "_DIR=%%i" +) else ( + set "_DIR=%~1" +) +cd %_DIR% + +rem TODO - Check with a real windows user that this works! +if exist .git\NUL ( + for /f "tokens=1delims= " in ('git log --format="%ci" -1') do set commitdate=%%a + echo %commitdate% +) + +:end +@endlocal diff --git a/tools/get-scala-commit-drift b/tools/get-scala-commit-drift new file mode 100755 index 0000000000..4959826ec1 --- /dev/null +++ b/tools/get-scala-commit-drift @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Usage: get-scala-commit-drift [dir] +# Figures out current commit drift of a git clone. +# If no dir is given, current working dir is used. +# +# Example output string: +# 123 +# +# Build drift = # of commits since last tag. + +[[ $# -eq 0 ]] || cd "$1" + +ensure_tag () { + sha=$1 + rev=$2 + + [[ -n $(git tag -l $rev) ]] || { + git tag -a -m "generated by get-scala-revision" $rev $sha + } +} + +# Ensure some baseline tags are present so if this repository's +# tags are screwed up or stale, we should still have a reference +# point for a build string. +ensure_tag 58cb15c40d v2.10.0-M1 +ensure_tag 29f3eace1e v2.9.1 +ensure_tag b0d78f6b9c v2.8.2 + +# the closest tag, obtained separately because we have to +# reconstruct the string around the padded distance. +tag=$(git describe --tags --match 'v2*' --abbrev=0) + +# printf %016s is not portable for 0-padding, has to be a digit. +# so we're stuck disassembling it. +described=$(git describe --tags --match 'v2*' --abbrev=10) +suffix="${described##${tag}-}" +counter=$(echo $suffix | cut -d - -f 1) + +echo "$counter" diff --git a/tools/get-scala-commit-drift.bat b/tools/get-scala-commit-drift.bat new file mode 100644 index 0000000000..ac289d3481 --- /dev/null +++ b/tools/get-scala-commit-drift.bat @@ -0,0 +1,21 @@ +@echo off +rem +rem Usage: get-scala-commit-drift.bat [dir] +rem Figures out current scala commit drift, of a clone. +rem +rem If no dir is given, current working dir is used. + +@setlocal +set _DIR= +if "%*"=="" ( + for /f "delims=;" %%i in ('cd') do set "_DIR=%%i" +) else ( + set "_DIR=%~1" +) +cd %_DIR% + +rem TODO - WRITE THIS +echo "TODO" + +:end +@endlocal diff --git a/tools/get-scala-commit-sha b/tools/get-scala-commit-sha new file mode 100755 index 0000000000..0aa70d985c --- /dev/null +++ b/tools/get-scala-commit-sha @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# +# Usage: get-scala-commit-sha [dir] +# Figures out current commit sha of a git clone. +# If no dir is given, current working dir is used. +# +# Example build version string: +# g6f1c486d0b +# + +[[ $# -eq 0 ]] || cd "$1" + +ensure_tag () { + sha=$1 + rev=$2 + + [[ -n $(git tag -l $rev) ]] || { + git tag -a -m "generated by get-scala-revision" $rev $sha + } +} + +# Ensure some baseline tags are present so if this repository's +# tags are screwed up or stale, we should still have a reference +# point for a build string. +ensure_tag 58cb15c40d v2.10.0-M1 +ensure_tag 29f3eace1e v2.9.1 +ensure_tag b0d78f6b9c v2.8.2 + +# the closest tag, obtained separately because we have to +# reconstruct the string around the padded distance. +tag=$(git describe --tags --match 'v2*' --abbrev=0) + +# printf %016s is not portable for 0-padding, has to be a digit. +# so we're stuck disassembling it. +described=$(git describe --tags --match 'v2*' --abbrev=10) +suffix="${described##${tag}-}" +hash=$(echo $suffix | cut -d - -f 2) + +echo "$hash" diff --git a/tools/get-scala-commit-sha.bat b/tools/get-scala-commit-sha.bat new file mode 100644 index 0000000000..80d9aa34b1 --- /dev/null +++ b/tools/get-scala-commit-sha.bat @@ -0,0 +1,21 @@ +@echo off +rem +rem Usage: get-scala-commit-drift.bat [dir] +rem Figures out current scala commit drift, of a clone. +rem +rem If no dir is given, current working dir is used. + +@setlocal +set _DIR= +if "%*"=="" ( + for /f "delims=;" %%i in ('cd') do set "_DIR=%%i" +) else ( + set "_DIR=%~1" +) +cd %_DIR% + +rem TODO - truncate chars. +git log -1 --format="%T" + +:end +@endlocal diff --git a/tools/get-scala-revision b/tools/get-scala-revision deleted file mode 100755 index 14c84d0ad4..0000000000 --- a/tools/get-scala-revision +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -# -# Usage: get-scala-revision [dir] -# Figures out current scala revision of a git clone. -# If no dir is given, current working dir is used. -# -# Example build version string: -# v2.10.0-M1-0098-g6f1c486d0b-2012-02-01 -# - -[[ $# -eq 0 ]] || cd "$1" - -ensure_tag () { - sha=$1 - rev=$2 - - [[ -n $(git tag -l $rev) ]] || { - git tag -a -m "generated by get-scala-revision" $rev $sha - } -} - -# Ensure some baseline tags are present so if this repository's -# tags are screwed up or stale, we should still have a reference -# point for a build string. -ensure_tag 58cb15c40d v2.10.0-M1 -ensure_tag 29f3eace1e v2.9.1 -ensure_tag b0d78f6b9c v2.8.2 - -# the closest tag, obtained separately because we have to -# reconstruct the string around the padded distance. -tag=$(git describe --tags --match 'v2*' --abbrev=0) - -# printf %016s is not portable for 0-padding, has to be a digit. -# so we're stuck disassembling it. -described=$(git describe --tags --match 'v2*' --abbrev=10) -suffix="${described##${tag}-}" -counter=$(echo $suffix | cut -d - -f 1) -hash=$(echo $suffix | cut -d - -f 2) - -# remove any alphabetic characters before the version number -tag=$(echo $tag | sed "s/\([a-z_A-Z]*\)\(.*\)/\2/") - -# 20120324-123-b0d78f7b9c -printf "%s-%04d-%s\n" $(date "+%Y%m%d") "$counter" "$hash" diff --git a/tools/get-scala-revision.bat b/tools/get-scala-revision.bat deleted file mode 100644 index b5b30eb3a8..0000000000 --- a/tools/get-scala-revision.bat +++ /dev/null @@ -1,27 +0,0 @@ -@echo off -rem -rem Usage: get-scala-revison.bat [dir] -rem Figures out current scala revision of a git clone. -rem -rem If no dir is given, current working dir is used. - -@setlocal -set _DIR= -if "%*"=="" ( - for /f "delims=;" %%i in ('cd') do set "_DIR=%%i" -) else ( - set "_DIR=%~1" -) -cd %_DIR% - -rem TODO - Look up bat scripting example and fix the darn string. -if exist .git\NUL ( - git describe --abbrev=10 --always --tags -) - -rem Implement something like the following -rem for /f "tokens=1,2,3 delims=- " %%a in ("%gitdescribe%") do set version=%%a&set commits=%%b&set sha=%%c -rem echo %date?%-%commits%-%sha% - -:end -@endlocal -- cgit v1.2.3 From 1ca609715206679b41e72c012fa62641f4695175 Mon Sep 17 00:00:00 2001 From: Josh Suereth Date: Fri, 16 Mar 2012 11:58:38 -0400 Subject: Fixed sha to not have the 'g' for git. Swapped 'r' to 'v' now that I've had more coffee and sleep. --- build.xml | 2 +- tools/get-scala-commit-sha | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'build.xml') diff --git a/build.xml b/build.xml index 7d05f02e2e..51cd2372ca 100644 --- a/build.xml +++ b/build.xml @@ -306,7 +306,7 @@ INITIALISATION value="${maven.version.number}-${git.commit.date}-${git.commit.drift}-${git.commit.sha}"/> + value="${version.major}.${version.minor}.${version.patch}.v${git.commit.date}${version.suffix}-${git.commit.sha}"/> diff --git a/tools/get-scala-commit-sha b/tools/get-scala-commit-sha index 0aa70d985c..0abe31a53c 100755 --- a/tools/get-scala-commit-sha +++ b/tools/get-scala-commit-sha @@ -5,7 +5,7 @@ # If no dir is given, current working dir is used. # # Example build version string: -# g6f1c486d0b +# 6f1c486d0ba # [[ $# -eq 0 ]] || cd "$1" @@ -35,5 +35,6 @@ tag=$(git describe --tags --match 'v2*' --abbrev=0) described=$(git describe --tags --match 'v2*' --abbrev=10) suffix="${described##${tag}-}" hash=$(echo $suffix | cut -d - -f 2) +hash=${hash#g} echo "$hash" -- cgit v1.2.3 From 5877a9264d8a9eef4f8a8a149b227474710a8eb0 Mon Sep 17 00:00:00 2001 From: Josh Suereth Date: Fri, 16 Mar 2012 12:22:31 -0400 Subject: Fixing merge conflicts for trunk. --- build.number | 4 ++-- build.xml | 19 +++---------------- 2 files changed, 5 insertions(+), 18 deletions(-) (limited to 'build.xml') diff --git a/build.number b/build.number index e5a19b9b7e..b5c4e61d13 100644 --- a/build.number +++ b/build.number @@ -1,7 +1,7 @@ #Tue Sep 11 19:21:09 CEST 2007 version.major=2 -version.minor=9 -version.patch=2 +version.minor=10 +version.patch=0 # This is the -N part of a version. if it's 0, it's dropped from maven versions. version.bnum=0 diff --git a/build.xml b/build.xml index 51cd2372ca..84e8252417 100644 --- a/build.xml +++ b/build.xml @@ -290,13 +290,6 @@ INITIALISATION - - - - - - - - - - - - - - - - + + + -- cgit v1.2.3