File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22#
33# publishes nightly build if $publish_to is set in environment.
4+ # alternate maven settings.xml file given in $maven_settings.
45#
56
67[[ $# -eq 1 ]] || {
@@ -20,7 +21,19 @@ version="$1"
2021}
2122
2223# should not be hardcoded
23- mavenSettings=" /home/linuxsoft/apps/hudson-maven-settings/settings.xml"
24+ # adds -Dsettings.file= if fixed path is present
25+ mavenSettingsOption () {
26+ hardcoded_path=" /home/linuxsoft/apps/hudson-maven-settings/settings.xml"
27+
28+ # environment variable
29+ if [[ -n $maven_settings ]]; then
30+ echo -Dsettings.file=" $maven_settings "
31+ elif [[ -f $hardcoded_path ]]; then
32+ echo -Dsettings.file=" $hardcoded_path "
33+ fi
34+ }
35+
36+ mavenSettings=${maven_settings:- findMavenSettings}
2437
2538if [[ -z $publish_to ]]; then
2639 echo " Nothing to publish."
3346 # sbaz
3447 [[ -d dists/sbaz ]] && rsync -az dists/sbaz/ " $publish_to /sbaz"
3548 # Deploy the maven artifacts on scala-tools.org
36- ( cd dists/maven/latest && ant deploy.snapshot -Dsettings.file= " $mavenSettings " )
49+ ( cd dists/maven/latest && ant deploy.snapshot $( mavenSettingsOption ) )
3750fi
You can’t perform that action at this time.
0 commit comments