From 9c15462891afd368d1e7d0ac3914613202428b24 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Fri, 9 Dec 2011 11:11:44 -0800 Subject: Swimming with the jenkins current. Configuring via environment variables. --- tools/epfl-build | 5 ++--- tools/epfl-publish | 36 +++++++++++++++++++++--------------- 2 files changed, 23 insertions(+), 18 deletions(-) (limited to 'tools') diff --git a/tools/epfl-build b/tools/epfl-build index e8f1be4a46..dd66307de3 100755 --- a/tools/epfl-build +++ b/tools/epfl-build @@ -10,8 +10,7 @@ Usage: $0 [opt opt ...] Example: $0 -Xcheckinit -Ycheck:all Environment variables: - - EXTRA_TARGETS Additional ant targets to run after nightly + extra_ant_targets Additional ant targets to run after nightly EOM exit 0 @@ -25,5 +24,5 @@ ant all.clean && ./pull-binary-libs.sh ant $scalaArgs build-opt && ant $scalaArgs nightly && -for target in $EXTRA_TARGETS; do ant $target ; done +for target in $extra_ant_targets; do ant $target ; done # [[ -n "$BUILD_DOCSCOMP" ]] && ant docscomp diff --git a/tools/epfl-publish b/tools/epfl-publish index 5f38bd067b..2c0141e264 100755 --- a/tools/epfl-publish +++ b/tools/epfl-publish @@ -1,31 +1,37 @@ #!/usr/bin/env bash # -# publishes nightly build +# publishes nightly build if $publish_to is set in environment. +# -[[ $# -eq 2 ]] || { +[[ $# -eq 1 ]] || { cat < +Usage: $0 + +Environment variables: + publish_to rsync destination EOM exit 0 } +version="$1" [[ -d dists/archives ]] || { echo "Can't find build, has it completed? No directory at dists/archives" exit 1 } -version="$1" -rsyncDest="$2" - # should not be hardcoded mavenSettings="/home/linuxsoft/apps/hudson-maven-settings/settings.xml" -echo "Copying nightly build to $rsyncDest" -# Archive Scala nightly distribution -rsync -az dists/archives/ "$rsyncDest/distributions" -# don't publish docs in 2.8.x -[[ $version == "2.8.x" ]] || rsync -az build/scaladoc/ "$rsyncDest/docs" -# sbaz -[[ -d dists/sbaz ]] && rsync -az dists/sbaz/ "$rsyncDest/sbaz" -# Deploy the maven artifacts on scala-tools.org -( cd dists/maven/latest && ant deploy.snapshot -Dsettings.file="$mavenSettings" ) +if [[ -z $publish_to ]]; then + echo "Nothing to publish." +else + echo "Publishing nightly build to $publish_to" + # Archive Scala nightly distribution + rsync -az dists/archives/ "$publish_to/distributions" + # don't publish docs in 2.8.x + [[ $version == "2.8.x" ]] || rsync -az build/scaladoc/ "$publish_to/docs" + # sbaz + [[ -d dists/sbaz ]] && rsync -az dists/sbaz/ "$publish_to/sbaz" + # Deploy the maven artifacts on scala-tools.org + ( cd dists/maven/latest && ant deploy.snapshot -Dsettings.file="$mavenSettings" ) +fi -- cgit v1.2.3