diff options
author | Paul Phillips <paulp@improving.org> | 2011-12-09 19:51:56 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-12-09 19:51:56 -0800 |
commit | 23b8216a3b589f07095d43a0405af40bce3c59d1 (patch) | |
tree | 379cc9117ed0fa3a5af060ee173e90614e812faa | |
parent | 413541662a49962a9c70a94dcba7c5f84132248f (diff) | |
parent | 56536de18c058b5aecd86c2a967b1bf19ce601be (diff) | |
download | scala-23b8216a3b589f07095d43a0405af40bce3c59d1.tar.gz scala-23b8216a3b589f07095d43a0405af40bce3c59d1.tar.bz2 scala-23b8216a3b589f07095d43a0405af40bce3c59d1.zip |
Merge branch 'common-build-script' into 2.8.x
-rwxr-xr-x | tools/epfl-publish | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tools/epfl-publish b/tools/epfl-publish index 2c0141e264..e9cd97b3d2 100755 --- a/tools/epfl-publish +++ b/tools/epfl-publish @@ -1,6 +1,7 @@ #!/usr/bin/env bash # # publishes nightly build if $publish_to is set in environment. +# alternate maven settings.xml file given in $maven_settings. # [[ $# -eq 1 ]] || { @@ -20,7 +21,19 @@ version="$1" } # should not be hardcoded -mavenSettings="/home/linuxsoft/apps/hudson-maven-settings/settings.xml" +# adds -Dsettings.file= if fixed path is present +mavenSettingsOption () { + hardcoded_path="/home/linuxsoft/apps/hudson-maven-settings/settings.xml" + + # environment variable + if [[ -n $maven_settings ]]; then + echo -Dsettings.file="$maven_settings" + elif [[ -f $hardcoded_path ]]; then + echo -Dsettings.file="$hardcoded_path" + fi +} + +mavenSettings=${maven_settings:-findMavenSettings} if [[ -z $publish_to ]]; then echo "Nothing to publish." @@ -33,5 +46,5 @@ else # 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" ) + ( cd dists/maven/latest && ant deploy.snapshot $(mavenSettingsOption) ) fi |