Skip to content

Commit

Permalink
Fix checking BUILDPR
Browse files Browse the repository at this point in the history
(Remove the regexp which I didn't actually use.)
  • Loading branch information
elibarzilay committed Jan 30, 2018
1 parent ae5cbf7 commit 43d2a8d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tools/build-pr/shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@ set -e

cd "$BASEDIR"

# For private builds: <user>/<repo>/<branch>
privatebuildrx="([^a-zA-Z0-9][^a-zA-Z0-9-]*)"
privatebuildrx+="/([a-zA-Z0-9+-]+)/([a-zA-Z0-9/+-]+)"

if [[ "$BUILDPR" = "" ]]; then :
elif [[ "$BUILDPR" =~ $privatebuildrx ]]; then :
elif [[ "$BUILDPR" = *[^0-9]* ]]; then
# BUILDPR can be empty, a PR number, or "<user>/<repo>/<branch>"
if [[ "$BUILDPR" != */*/* && "$BUILDPR" = *[^0-9]* ]]; then
failwith "\$BUILDPR should be a number, got: \"$BUILDPR\""
fi

Expand Down

0 comments on commit 43d2a8d

Please sign in to comment.