]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-dev-setup: use the new utility for slashes in branches 466/head
authorAlfredo Deza <adeza@redhat.com>
Fri, 9 Sep 2016 18:56:43 +0000 (14:56 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 9 Sep 2016 18:56:56 +0000 (14:56 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-dev-setup/build/build

index c967a5b9bf4ca9a5cc82ca2e85347eb000d4f6e9..1c9e1a4cd23954a9ee06f507fbac64be2916b1dc 100644 (file)
@@ -1,14 +1,6 @@
 #!/bin/bash -ex
 
-branch_slashes=$(grep -o "/" <<< ${GIT_BRANCH} | wc -l)
-BRANCH=`echo ${GIT_BRANCH} | rev | cut -d '/' -f 1 | rev`
-
-# Prevent building branches that have slashes in their name
-if [ "$((branch_slashes))" -gt 1 ] ; then
-    echo "Will refuse to build branch: ${GIT_BRANCH}"
-    echo "Invalid branch name (contains slashes): ${BRANCH}"
-    exit 1
-fi
+BRANCH=`branch_slash_filter $BRANCH`
 
 # split on '/' to get just 'wip-mybranch' when input is like: origin/wip-mybranch