]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-dev-build: add scripts to validate distro type 427/head
authorAndrew Schoen <aschoen@redhat.com>
Wed, 10 Aug 2016 20:14:59 +0000 (15:14 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Wed, 10 Aug 2016 20:14:59 +0000 (15:14 -0500)
This will make sure a build script fails early if it will not work on
the distro being built for. Doing this early avoids duplicate calls to
the build_utils and setup scripts.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
ceph-dev-build/build/build_deb
ceph-dev-build/build/validate_deb [new file with mode: 0644]
ceph-dev-build/build/validate_rpm [new file with mode: 0644]
ceph-dev-build/config/definitions/ceph-dev-build.yml

index bd49e5ab85c8333de65c28e92a71bdb27b9c849b..239ca986d0aa77590b5aae5e3bca851b279d8f36 100644 (file)
@@ -1,11 +1,6 @@
 #!/bin/bash
 set -ex
 
-# Only do actual work when we are a DEB distro
-if test -f /etc/redhat-release ; then
-    exit 0
-fi
-
 cd $WORKSPACE
 
 get_bptag() {
diff --git a/ceph-dev-build/build/validate_deb b/ceph-dev-build/build/validate_deb
new file mode 100644 (file)
index 0000000..0322b47
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+set -ex
+
+# Only do actual work when we are a DEB distro
+if test -f /etc/redhat-release ; then
+    exit 0
+fi
diff --git a/ceph-dev-build/build/validate_rpm b/ceph-dev-build/build/validate_rpm
new file mode 100644 (file)
index 0000000..17b4148
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+set -ex
+
+# only do work if we are a RPM distro
+if [[ ! -f /etc/redhat-release && ! -f /usr/bin/zypper ]] ; then
+    exit 0
+fi
index 387edce66260ea758bf5bc9f9e27ce71930fd394..02da4e0e41cd0c48daa75b0b19f4199c57de184b 100644 (file)
@@ -53,6 +53,7 @@
       # debian build scripts
       - shell:
           !include-raw:
+            - ../../build/validate_deb
             - ../../../scripts/build_utils.sh
             - ../../build/setup
             - ../../build/setup_pbuilder
@@ -60,6 +61,7 @@
       # rpm build scripts
       - shell:
           !include-raw:
+            - ../../build/validate_rpm
             - ../../../scripts/build_utils.sh
             - ../../build/setup
             - ../../build/build_rpm