Skip to content

Commit

Permalink
Nightly builds: fix bug when processing a single branch
Browse files Browse the repository at this point in the history
Bash brace expansion does not work when there are no commas in the
list of branches to process.

Add special handling for when a single branch is specified.
  • Loading branch information
dregad committed Jan 11, 2017
1 parent bc0a3de commit 75a738b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nightly-builds.sh
Expand Up @@ -55,7 +55,12 @@ EOF
# Build the tarballs
echo "$(date +'%F %T') Generating nightly builds for branches:"
refList=$(eval echo origin/{$branches})
echo $refList |sed -r 's/ /\n/g;s/(^|\n)/\1 /g'
if [[ $branches == *,* ]]
then
refList=$(eval echo origin/{$branches})
else
refList=origin/$branches
fi
$pathTools/buildrelease-repo.py --auto-suffix --ref ${refList// /,} --fresh --docbook $pathBuilds >>$logfile 2>&1
echo >>$logfile

Expand Down

0 comments on commit 75a738b

Please sign in to comment.