Merge "defensive coding for docbook-properties.sh"
This commit is contained in:
commit
a63a95aff3
13
modules/jenkins/files/slave_scripts/docbook-properties.sh
Normal file → Executable file
13
modules/jenkins/files/slave_scripts/docbook-properties.sh
Normal file → Executable file
@ -10,17 +10,16 @@
|
|||||||
BRANCH=$ZUUL_REFNAME
|
BRANCH=$ZUUL_REFNAME
|
||||||
|
|
||||||
# The master branch should get published to /trunk
|
# The master branch should get published to /trunk
|
||||||
if [ $BRANCH == "master" ]
|
if [[ $BRANCH == "master" ]]; then
|
||||||
then
|
|
||||||
DOC_RELEASE_PATH="trunk"
|
DOC_RELEASE_PATH="trunk"
|
||||||
DOC_COMMENTS_ENABLED=0
|
DOC_COMMENTS_ENABLED=0
|
||||||
fi
|
elif [[ $BRANCH =~ ^stable/(.*)$ ]]; then
|
||||||
|
# The stable/<releasename> branch should get published to /releasename, such as icehouse or havana
|
||||||
# The stable/<releasename> branch should get published to /releasename, such as icehouse or havana
|
|
||||||
if [[ $BRANCH =~ ^stable/(.*)$ ]]
|
|
||||||
then
|
|
||||||
DOC_RELEASE_PATH=${BASH_REMATCH[1]}
|
DOC_RELEASE_PATH=${BASH_REMATCH[1]}
|
||||||
DOC_COMMENTS_ENABLED=1
|
DOC_COMMENTS_ENABLED=1
|
||||||
|
else
|
||||||
|
echo "Error: Branch($BRANCH) is invalid"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "DOC_RELEASE_PATH=$DOC_RELEASE_PATH" >gerrit-doc.properties
|
echo "DOC_RELEASE_PATH=$DOC_RELEASE_PATH" >gerrit-doc.properties
|
||||||
|
Loading…
Reference in New Issue
Block a user