Skip to content

Commit 56536de

Browse files
committed
Making path to settings.xml configurable.
Environment variable maven_settings.
1 parent 59348d0 commit 56536de

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tools/epfl-publish

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
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 ]] || {
@@ -22,9 +23,13 @@ version="$1"
2223
# should not be hardcoded
2324
# adds -Dsettings.file= if fixed path is present
2425
mavenSettingsOption () {
25-
path="/home/linuxsoft/apps/hudson-maven-settings/settings.xml"
26-
if [[ -f $path ]]; then
27-
echo -Dsettings.file="$path"
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"
2833
fi
2934
}
3035

0 commit comments

Comments
 (0)