From 59348d0160b3f7d7c78f29f866017d88b16dd9b0 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Fri, 9 Dec 2011 19:14:46 -0800 Subject: Boiling more logic out of jenkins. Offer explicit settings.xml path for maven if some specific hardcoded path exists, don't otherwise. At least it's in one place where we can keep an eye on it. --- tools/epfl-publish | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'tools/epfl-publish') diff --git a/tools/epfl-publish b/tools/epfl-publish index 2c0141e264..59ae6f138a 100755 --- a/tools/epfl-publish +++ b/tools/epfl-publish @@ -20,7 +20,15 @@ version="$1" } # should not be hardcoded -mavenSettings="/home/linuxsoft/apps/hudson-maven-settings/settings.xml" +# adds -Dsettings.file= if fixed path is present +mavenSettingsOption () { + path="/home/linuxsoft/apps/hudson-maven-settings/settings.xml" + if [[ -f $path ]]; then + echo -Dsettings.file="$path" + fi +} + +mavenSettings=${maven_settings:-findMavenSettings} if [[ -z $publish_to ]]; then echo "Nothing to publish." @@ -33,5 +41,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 -- cgit v1.2.3