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>
#!/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() {
--- /dev/null
+#!/bin/bash
+set -ex
+
+# Only do actual work when we are a DEB distro
+if test -f /etc/redhat-release ; then
+ exit 0
+fi
--- /dev/null
+#!/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
# debian build scripts
- shell:
!include-raw:
+ - ../../build/validate_deb
- ../../../scripts/build_utils.sh
- ../../build/setup
- ../../build/setup_pbuilder
# rpm build scripts
- shell:
!include-raw:
+ - ../../build/validate_rpm
- ../../../scripts/build_utils.sh
- ../../build/setup
- ../../build/build_rpm