From f54c2d762b476218b708bb5fc073549da840ec71 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Mon, 29 Dec 2014 14:47:08 -0800 Subject: [PATCH 1/2] Import from jenkins-scripts --- conf/repositories | 7 ++++ scripts/jobs/scala-release-2.11.x-scala-lang | 36 ++++++++++++++++++++ scripts/jobs/scala-release-2.11.x-unix | 30 ++++++++++++++++ scripts/jobs/scala-release-2.11.x-windows | 30 ++++++++++++++++ scripts/scala-release-2.11.x-pkg | 30 ++++++++++++++++ 5 files changed, 133 insertions(+) create mode 100644 conf/repositories create mode 100755 scripts/jobs/scala-release-2.11.x-scala-lang create mode 100644 scripts/jobs/scala-release-2.11.x-unix create mode 100644 scripts/jobs/scala-release-2.11.x-windows create mode 100644 scripts/scala-release-2.11.x-pkg diff --git a/conf/repositories b/conf/repositories new file mode 100644 index 000000000..00538a08f --- /dev/null +++ b/conf/repositories @@ -0,0 +1,7 @@ +[repositories] + plugins: http://dl.bintray.com/sbt/sbt-plugin-releases/, [organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext] + private-repo: http://private-repo.typesafe.com/typesafe/scala-release-temp/ + typesafe-ivy-releases: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly + sbt-plugin-releases: http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext] + maven-central + local \ No newline at end of file diff --git a/scripts/jobs/scala-release-2.11.x-scala-lang b/scripts/jobs/scala-release-2.11.x-scala-lang new file mode 100755 index 000000000..5283aa493 --- /dev/null +++ b/scripts/jobs/scala-release-2.11.x-scala-lang @@ -0,0 +1,36 @@ +#!/bin/bash -ex +url="http://downloads.typesafe.com/scala/$version" + +if [[ "$version" =~ .*-nightly ]] +then archivesDir="~linuxsoft/archives/scala/nightly/2.11.x" +else archivesDir="~linuxsoft/archives/scala" +fi + +# make this build restartable (if interrupted, partial files may remain, and resuming isn't very reliable) +[[ -n $version ]] && ssh scalatest@chara "rm -f $archivesDir/scala-*$version* && rm -rf $archivesDir/api/$version/ ||:" + +cacheBuster="$(date +%s | tail -c2 | head -c1)" +ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-$version.msi '$url/scala-$version.msi?$cacheBuster'" +ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-$version.zip '$url/scala-$version.zip?$cacheBuster'" +ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-$version.tgz '$url/scala-$version.tgz?$cacheBuster'" +ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-$version.deb '$url/scala-$version.deb?$cacheBuster'" +ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-$version.rpm '$url/scala-$version.rpm?$cacheBuster'" +ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-docs-$version.zip '$url/scala-docs-$version.zip?$cacheBuster'" +ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-docs-$version.tgz '$url/scala-docs-$version.tgz?$cacheBuster'" +ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-docs-$version.txz '$url/scala-docs-$version.txz?$cacheBuster'" + +echo "Expanding scala-library API docs for $version to api/$version (with subdirectories for scala-compiler and scala-reflect)." +ssh scalatest@chara "cd $archivesDir && mkdir -p api/$version && tar -xvz --strip-component 2 -f scala-docs-$version.tgz -C api/$version && mv api/$version/scala-library/* api/$version/" # tar on jenkins does not support the -s option + +echo "Expanding the Scaladoc for other bundled modules" +# treat scala-actors separately because it's not cross-versioned +ssh scalatest@chara "(set -x; cd $archivesDir && mkdir -p api/$version/scala-actors && unzip \$(find api/$version/jars -name 'scala-actors-2.11*javadoc.jar' -o -name scala-actors-${version}-javadoc.jar) -d api/$version/scala-actors;)" + +modules="scala-actors-migration scala-continuations-library scala-parser-combinators scala-swing scala-xml" +for m in $modules; do +ssh scalatest@chara "(set -x; cd $archivesDir && mkdir -p api/$version/$m && unzip \$(find api/$version/jars -name ${m}_'*javadoc.jar' -o -name ${m}-${version}-javadoc.jar) -d api/$version/$m;)" +done + +echo "Symlinking api/$version to api/2.11.x." + +ssh scalatest@chara "cd $archivesDir/api/ ; [[ -d $version ]] && ln -sfn $version 2.11.x" diff --git a/scripts/jobs/scala-release-2.11.x-unix b/scripts/jobs/scala-release-2.11.x-unix new file mode 100644 index 000000000..abe618789 --- /dev/null +++ b/scripts/jobs/scala-release-2.11.x-unix @@ -0,0 +1,30 @@ +# no bang here, because we want to run both under cygwin and real unix +# sbtDistTarget must be supplied +# sbtDistVersionOverride may be -Dproject.version=.... to override the version of the dist to build (only for testing, you should use tags for real releases!) +# sbtLauncher is a global jenkins configuration variable +repositoriesFile="$WORKSPACE/jenkins-scripts/repositories-scala-release" + +echo "Using repo config:" +cat "$repositoriesFile" + +# version is set by the scala-release-2.11.x-dist build flow, make sure it's consistent with the tag +# this is also a backstop for https://github.com/sbt/sbt-git/issues/35 +# ignore when there is no version (job is running outside of the flow) + +# http://stackoverflow.com/questions/4545370/how-to-list-all-tags-pointing-to-a-specific-commit-in-git +# if only we had git 1.7.10 or higher: tags="$(git tag --points-at HEAD)" +tags="$(git show-ref --tags -d | grep $(git rev-parse HEAD) | cut -f3 -d/ | cut -f1 -d^)" + +[[ -z $sbtDistVersionOverride ]] && [[ -n $version ]] && if [ "$tags" != "v$version" ]; then + echo "Inconsistent tag/version combo detected. Abort-abort." + exit 255 +fi + +rm -rf $WORKSPACE/.ivy2 + +# want full control over sbt, so invoke the launcher directly +java -Dsbt.log.noformat=true -Dsbt.ivy.home=$WORKSPACE/.ivy2 \ + -Dsbt.override.build.repos=true -Dsbt.repository.config="$repositoriesFile" \ + -jar $sbtLauncher \ + $sbtDistVersionOverride \ + clean update $sbtDistTarget \ No newline at end of file diff --git a/scripts/jobs/scala-release-2.11.x-windows b/scripts/jobs/scala-release-2.11.x-windows new file mode 100644 index 000000000..abe618789 --- /dev/null +++ b/scripts/jobs/scala-release-2.11.x-windows @@ -0,0 +1,30 @@ +# no bang here, because we want to run both under cygwin and real unix +# sbtDistTarget must be supplied +# sbtDistVersionOverride may be -Dproject.version=.... to override the version of the dist to build (only for testing, you should use tags for real releases!) +# sbtLauncher is a global jenkins configuration variable +repositoriesFile="$WORKSPACE/jenkins-scripts/repositories-scala-release" + +echo "Using repo config:" +cat "$repositoriesFile" + +# version is set by the scala-release-2.11.x-dist build flow, make sure it's consistent with the tag +# this is also a backstop for https://github.com/sbt/sbt-git/issues/35 +# ignore when there is no version (job is running outside of the flow) + +# http://stackoverflow.com/questions/4545370/how-to-list-all-tags-pointing-to-a-specific-commit-in-git +# if only we had git 1.7.10 or higher: tags="$(git tag --points-at HEAD)" +tags="$(git show-ref --tags -d | grep $(git rev-parse HEAD) | cut -f3 -d/ | cut -f1 -d^)" + +[[ -z $sbtDistVersionOverride ]] && [[ -n $version ]] && if [ "$tags" != "v$version" ]; then + echo "Inconsistent tag/version combo detected. Abort-abort." + exit 255 +fi + +rm -rf $WORKSPACE/.ivy2 + +# want full control over sbt, so invoke the launcher directly +java -Dsbt.log.noformat=true -Dsbt.ivy.home=$WORKSPACE/.ivy2 \ + -Dsbt.override.build.repos=true -Dsbt.repository.config="$repositoriesFile" \ + -jar $sbtLauncher \ + $sbtDistVersionOverride \ + clean update $sbtDistTarget \ No newline at end of file diff --git a/scripts/scala-release-2.11.x-pkg b/scripts/scala-release-2.11.x-pkg new file mode 100644 index 000000000..abe618789 --- /dev/null +++ b/scripts/scala-release-2.11.x-pkg @@ -0,0 +1,30 @@ +# no bang here, because we want to run both under cygwin and real unix +# sbtDistTarget must be supplied +# sbtDistVersionOverride may be -Dproject.version=.... to override the version of the dist to build (only for testing, you should use tags for real releases!) +# sbtLauncher is a global jenkins configuration variable +repositoriesFile="$WORKSPACE/jenkins-scripts/repositories-scala-release" + +echo "Using repo config:" +cat "$repositoriesFile" + +# version is set by the scala-release-2.11.x-dist build flow, make sure it's consistent with the tag +# this is also a backstop for https://github.com/sbt/sbt-git/issues/35 +# ignore when there is no version (job is running outside of the flow) + +# http://stackoverflow.com/questions/4545370/how-to-list-all-tags-pointing-to-a-specific-commit-in-git +# if only we had git 1.7.10 or higher: tags="$(git tag --points-at HEAD)" +tags="$(git show-ref --tags -d | grep $(git rev-parse HEAD) | cut -f3 -d/ | cut -f1 -d^)" + +[[ -z $sbtDistVersionOverride ]] && [[ -n $version ]] && if [ "$tags" != "v$version" ]; then + echo "Inconsistent tag/version combo detected. Abort-abort." + exit 255 +fi + +rm -rf $WORKSPACE/.ivy2 + +# want full control over sbt, so invoke the launcher directly +java -Dsbt.log.noformat=true -Dsbt.ivy.home=$WORKSPACE/.ivy2 \ + -Dsbt.override.build.repos=true -Dsbt.repository.config="$repositoriesFile" \ + -jar $sbtLauncher \ + $sbtDistVersionOverride \ + clean update $sbtDistTarget \ No newline at end of file From e7131854e3d0072273148863dd9bc5560efa8c72 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Tue, 23 Dec 2014 12:12:31 -0800 Subject: [PATCH 2/2] Towards travis-style CI Move scripts closer to the stuff they script, in preparation for a more travis-like CI set up. Moved from scala/jenkins-scripts, see also scala-jenkins-infra. Introduced `sshCharaArgs`, must turn it into an array using `declare -a` --- conf/repositories | 2 +- scripts/jobs/scala-release-2.11.x-scala-lang | 29 +++++++++-------- scripts/jobs/scala-release-2.11.x-unix | 30 ++--------------- scripts/jobs/scala-release-2.11.x-windows | 32 +++--------------- scripts/scala-release-2.11.x-pkg | 34 +++++++++++--------- 5 files changed, 42 insertions(+), 85 deletions(-) mode change 100644 => 100755 scripts/jobs/scala-release-2.11.x-unix mode change 100644 => 100755 scripts/jobs/scala-release-2.11.x-windows mode change 100644 => 100755 scripts/scala-release-2.11.x-pkg diff --git a/conf/repositories b/conf/repositories index 00538a08f..3a831c4f6 100644 --- a/conf/repositories +++ b/conf/repositories @@ -4,4 +4,4 @@ typesafe-ivy-releases: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly sbt-plugin-releases: http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext] maven-central - local \ No newline at end of file + local diff --git a/scripts/jobs/scala-release-2.11.x-scala-lang b/scripts/jobs/scala-release-2.11.x-scala-lang index 5283aa493..b40927002 100755 --- a/scripts/jobs/scala-release-2.11.x-scala-lang +++ b/scripts/jobs/scala-release-2.11.x-scala-lang @@ -1,4 +1,7 @@ #!/bin/bash -ex +# need to re-declare it as an array, not sure how to do that directly in jenkins +declare -a sshCharaArgs="$sshCharaArgs" + url="http://downloads.typesafe.com/scala/$version" if [[ "$version" =~ .*-nightly ]] @@ -7,30 +10,30 @@ else archivesDir="~linuxsoft/archives/scala" fi # make this build restartable (if interrupted, partial files may remain, and resuming isn't very reliable) -[[ -n $version ]] && ssh scalatest@chara "rm -f $archivesDir/scala-*$version* && rm -rf $archivesDir/api/$version/ ||:" +[[ -n $version ]] && ssh "${sshCharaArgs[@]}" "rm -f $archivesDir/scala-*$version* && rm -rf $archivesDir/api/$version/ ||:" cacheBuster="$(date +%s | tail -c2 | head -c1)" -ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-$version.msi '$url/scala-$version.msi?$cacheBuster'" -ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-$version.zip '$url/scala-$version.zip?$cacheBuster'" -ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-$version.tgz '$url/scala-$version.tgz?$cacheBuster'" -ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-$version.deb '$url/scala-$version.deb?$cacheBuster'" -ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-$version.rpm '$url/scala-$version.rpm?$cacheBuster'" -ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-docs-$version.zip '$url/scala-docs-$version.zip?$cacheBuster'" -ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-docs-$version.tgz '$url/scala-docs-$version.tgz?$cacheBuster'" -ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-docs-$version.txz '$url/scala-docs-$version.txz?$cacheBuster'" +ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-$version.msi '$url/scala-$version.msi?$cacheBuster'" +ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-$version.zip '$url/scala-$version.zip?$cacheBuster'" +ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-$version.tgz '$url/scala-$version.tgz?$cacheBuster'" +ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-$version.deb '$url/scala-$version.deb?$cacheBuster'" +ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-$version.rpm '$url/scala-$version.rpm?$cacheBuster'" +ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-docs-$version.zip '$url/scala-docs-$version.zip?$cacheBuster'" +ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-docs-$version.tgz '$url/scala-docs-$version.tgz?$cacheBuster'" +ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-docs-$version.txz '$url/scala-docs-$version.txz?$cacheBuster'" echo "Expanding scala-library API docs for $version to api/$version (with subdirectories for scala-compiler and scala-reflect)." -ssh scalatest@chara "cd $archivesDir && mkdir -p api/$version && tar -xvz --strip-component 2 -f scala-docs-$version.tgz -C api/$version && mv api/$version/scala-library/* api/$version/" # tar on jenkins does not support the -s option +ssh "${sshCharaArgs[@]}" "cd $archivesDir && mkdir -p api/$version && tar -xvz --strip-component 2 -f scala-docs-$version.tgz -C api/$version && mv api/$version/scala-library/* api/$version/" # tar on jenkins does not support the -s option echo "Expanding the Scaladoc for other bundled modules" # treat scala-actors separately because it's not cross-versioned -ssh scalatest@chara "(set -x; cd $archivesDir && mkdir -p api/$version/scala-actors && unzip \$(find api/$version/jars -name 'scala-actors-2.11*javadoc.jar' -o -name scala-actors-${version}-javadoc.jar) -d api/$version/scala-actors;)" +ssh "${sshCharaArgs[@]}" "(set -x; cd $archivesDir && mkdir -p api/$version/scala-actors && unzip \$(find api/$version/jars -name 'scala-actors-2.11*javadoc.jar' -o -name scala-actors-${version}-javadoc.jar) -d api/$version/scala-actors;)" modules="scala-actors-migration scala-continuations-library scala-parser-combinators scala-swing scala-xml" for m in $modules; do -ssh scalatest@chara "(set -x; cd $archivesDir && mkdir -p api/$version/$m && unzip \$(find api/$version/jars -name ${m}_'*javadoc.jar' -o -name ${m}-${version}-javadoc.jar) -d api/$version/$m;)" +ssh "${sshCharaArgs[@]}" "(set -x; cd $archivesDir && mkdir -p api/$version/$m && unzip \$(find api/$version/jars -name ${m}_'*javadoc.jar' -o -name ${m}-${version}-javadoc.jar) -d api/$version/$m;)" done echo "Symlinking api/$version to api/2.11.x." -ssh scalatest@chara "cd $archivesDir/api/ ; [[ -d $version ]] && ln -sfn $version 2.11.x" +ssh "${sshCharaArgs[@]}" "cd $archivesDir/api/ ; [[ -d $version ]] && ln -sfn $version 2.11.x" \ No newline at end of file diff --git a/scripts/jobs/scala-release-2.11.x-unix b/scripts/jobs/scala-release-2.11.x-unix old mode 100644 new mode 100755 index abe618789..6041db50f --- a/scripts/jobs/scala-release-2.11.x-unix +++ b/scripts/jobs/scala-release-2.11.x-unix @@ -1,30 +1,6 @@ -# no bang here, because we want to run both under cygwin and real unix -# sbtDistTarget must be supplied -# sbtDistVersionOverride may be -Dproject.version=.... to override the version of the dist to build (only for testing, you should use tags for real releases!) -# sbtLauncher is a global jenkins configuration variable -repositoriesFile="$WORKSPACE/jenkins-scripts/repositories-scala-release" - -echo "Using repo config:" -cat "$repositoriesFile" - -# version is set by the scala-release-2.11.x-dist build flow, make sure it's consistent with the tag -# this is also a backstop for https://github.com/sbt/sbt-git/issues/35 -# ignore when there is no version (job is running outside of the flow) - -# http://stackoverflow.com/questions/4545370/how-to-list-all-tags-pointing-to-a-specific-commit-in-git -# if only we had git 1.7.10 or higher: tags="$(git tag --points-at HEAD)" -tags="$(git show-ref --tags -d | grep $(git rev-parse HEAD) | cut -f3 -d/ | cut -f1 -d^)" - -[[ -z $sbtDistVersionOverride ]] && [[ -n $version ]] && if [ "$tags" != "v$version" ]; then - echo "Inconsistent tag/version combo detected. Abort-abort." - exit 255 -fi +# @pre current directory == repo root +# to be extra-sure we don't pollute rm -rf $WORKSPACE/.ivy2 -# want full control over sbt, so invoke the launcher directly -java -Dsbt.log.noformat=true -Dsbt.ivy.home=$WORKSPACE/.ivy2 \ - -Dsbt.override.build.repos=true -Dsbt.repository.config="$repositoriesFile" \ - -jar $sbtLauncher \ - $sbtDistVersionOverride \ - clean update $sbtDistTarget \ No newline at end of file +. scripts/scala-release-2.11.x-pkg \ No newline at end of file diff --git a/scripts/jobs/scala-release-2.11.x-windows b/scripts/jobs/scala-release-2.11.x-windows old mode 100644 new mode 100755 index abe618789..c8a400a9a --- a/scripts/jobs/scala-release-2.11.x-windows +++ b/scripts/jobs/scala-release-2.11.x-windows @@ -1,30 +1,6 @@ -# no bang here, because we want to run both under cygwin and real unix -# sbtDistTarget must be supplied -# sbtDistVersionOverride may be -Dproject.version=.... to override the version of the dist to build (only for testing, you should use tags for real releases!) -# sbtLauncher is a global jenkins configuration variable -repositoriesFile="$WORKSPACE/jenkins-scripts/repositories-scala-release" +# @pre current directory == repo root -echo "Using repo config:" -cat "$repositoriesFile" +# to be extra-sure we don't pollute +rm -rf "$(/usr/bin/cygpath --unix $WORKSPACE/.ivy2)" -# version is set by the scala-release-2.11.x-dist build flow, make sure it's consistent with the tag -# this is also a backstop for https://github.com/sbt/sbt-git/issues/35 -# ignore when there is no version (job is running outside of the flow) - -# http://stackoverflow.com/questions/4545370/how-to-list-all-tags-pointing-to-a-specific-commit-in-git -# if only we had git 1.7.10 or higher: tags="$(git tag --points-at HEAD)" -tags="$(git show-ref --tags -d | grep $(git rev-parse HEAD) | cut -f3 -d/ | cut -f1 -d^)" - -[[ -z $sbtDistVersionOverride ]] && [[ -n $version ]] && if [ "$tags" != "v$version" ]; then - echo "Inconsistent tag/version combo detected. Abort-abort." - exit 255 -fi - -rm -rf $WORKSPACE/.ivy2 - -# want full control over sbt, so invoke the launcher directly -java -Dsbt.log.noformat=true -Dsbt.ivy.home=$WORKSPACE/.ivy2 \ - -Dsbt.override.build.repos=true -Dsbt.repository.config="$repositoriesFile" \ - -jar $sbtLauncher \ - $sbtDistVersionOverride \ - clean update $sbtDistTarget \ No newline at end of file +. scripts/scala-release-2.11.x-pkg \ No newline at end of file diff --git a/scripts/scala-release-2.11.x-pkg b/scripts/scala-release-2.11.x-pkg old mode 100644 new mode 100755 index abe618789..5fe5d624f --- a/scripts/scala-release-2.11.x-pkg +++ b/scripts/scala-release-2.11.x-pkg @@ -1,30 +1,32 @@ -# no bang here, because we want to run both under cygwin and real unix -# sbtDistTarget must be supplied -# sbtDistVersionOverride may be -Dproject.version=.... to override the version of the dist to build (only for testing, you should use tags for real releases!) -# sbtLauncher is a global jenkins configuration variable -repositoriesFile="$WORKSPACE/jenkins-scripts/repositories-scala-release" +# @pre current directory == repo root +# must run on both windows (cygwin) and linux -echo "Using repo config:" -cat "$repositoriesFile" +# invoked from scala-release-2.11.x-[unix|windows] + +# uses the following env vars: +# - WORKSPACE, JAVA_OPTS (jenkins standard) +# - version checked for consistency against HEAD's tag +# - sbtLauncher is a global jenkins configuration variable +# - sbtDistTarget the target (beyond clean and update) to run +# - sbtDistVersionOverride may be -Dproject.version=.... to override the version of the dist to build (only for testing, you should use tags for real releases!) + +# requires git (>= 1.8), java, bash + +repositoriesFile="$WORKSPACE/conf/repositories" + +tags="$(git tag --points-at HEAD)" # version is set by the scala-release-2.11.x-dist build flow, make sure it's consistent with the tag # this is also a backstop for https://github.com/sbt/sbt-git/issues/35 # ignore when there is no version (job is running outside of the flow) - -# http://stackoverflow.com/questions/4545370/how-to-list-all-tags-pointing-to-a-specific-commit-in-git -# if only we had git 1.7.10 or higher: tags="$(git tag --points-at HEAD)" -tags="$(git show-ref --tags -d | grep $(git rev-parse HEAD) | cut -f3 -d/ | cut -f1 -d^)" - [[ -z $sbtDistVersionOverride ]] && [[ -n $version ]] && if [ "$tags" != "v$version" ]; then echo "Inconsistent tag/version combo detected. Abort-abort." exit 255 fi -rm -rf $WORKSPACE/.ivy2 - # want full control over sbt, so invoke the launcher directly -java -Dsbt.log.noformat=true -Dsbt.ivy.home=$WORKSPACE/.ivy2 \ +java $JAVA_OPTS -Dsbt.log.noformat=true -Dsbt.ivy.home=$WORKSPACE/.ivy2 \ -Dsbt.override.build.repos=true -Dsbt.repository.config="$repositoriesFile" \ -jar $sbtLauncher \ $sbtDistVersionOverride \ - clean update $sbtDistTarget \ No newline at end of file + clean update $sbtDistTarget