]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
get_bptag needs to be before the chacractl exists command
authorAndrew Schoen <aschoen@redhat.com>
Wed, 28 Oct 2015 19:57:41 +0000 (14:57 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Wed, 28 Oct 2015 19:57:41 +0000 (14:57 -0500)
without this the $dist var will not be set

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
ceph-build-next/build/build_deb

index 652ff57987b6f0226fd616bb375e18f5c10ab8da..021d369e09c8ec5a3ca89349cfded274dcb9d7f3 100644 (file)
@@ -6,19 +6,6 @@ if test -f /etc/redhat-release ; then
     exit 0
 fi
 
-[ "$TEST" = true ] && chacra_ref="$vers" || chacra_ref="test"
-vers=`cat ./dist/version`
-distro=`python -c "exec 'import platform; print platform.linux_distribution()[0].lower()'"`
-chacra_endpoint="ceph/${chacra_ref}/${distro}/{$dist}/${ARCH}"
-
-chacractl exists binaries/${chacra_endpoint}; exists=$? || true
-
-# if the binary already exists in chacra, do not rebuild
-if [ $exists -e 0 ] && [ "$FORCE" = false ] ; then
-    echo "The endpoint at ${chacra_endpoint} already exists and FORCE was not set, Exiting..."
-    exit 0
-fi
-
 get_bptag() {
     dist=$1
 
@@ -41,6 +28,20 @@ get_bptag() {
 
 BPTAG=`get_bptag $DIST`
 
+[ "$TEST" = true ] && chacra_ref="$vers" || chacra_ref="test"
+vers=`cat ./dist/version`
+distro=`python -c "exec 'import platform; print platform.linux_distribution()[0].lower()'"`
+chacra_endpoint="ceph/${chacra_ref}/${distro}/{$dist}/${ARCH}"
+
+chacractl exists binaries/${chacra_endpoint}; exists=$? || true
+
+# if the binary already exists in chacra, do not rebuild
+if [ $exists -e 0 ] && [ "$FORCE" = false ] ; then
+    echo "The endpoint at ${chacra_endpoint} already exists and FORCE was not set, Exiting..."
+    exit 0
+fi
+
+
 HOST=$(hostname --short)
 echo "Building on $(hostname) Date: $(date)"
 echo "  DIST=${DIST}"