From 083e957404a6fe4c7fecd48109c39e4b0bcebb4d Mon Sep 17 00:00:00 2001
From: Emilien Macchi <emilien@redhat.com>
Date: Fri, 15 Apr 2016 08:50:59 -0400
Subject: [PATCH] run-wheel.sh: only run wheel for Python projects

tarball JJB macro run wheel, but we have to verify if the project is
whether or not a Python project.

This patch will make possible for Puppet modules to run the tarball
macro without complexity.
We check if it's a Python project if metadata.json file IS NOT present.
Indeed, this file is really Puppet specific.

Change-Id: Id2e307ae53b8ef1bb2be71c8ba3541cadb5ca12b
---
 jenkins/scripts/run-wheel.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/jenkins/scripts/run-wheel.sh b/jenkins/scripts/run-wheel.sh
index 7b3048e2c3..0c9d22f436 100644
--- a/jenkins/scripts/run-wheel.sh
+++ b/jenkins/scripts/run-wheel.sh
@@ -14,6 +14,13 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
+# metadata.json is a file present in Puppet modules but not in Python projects.
+# Based on this information, we'll run wheel only on Python projects.
+# This conditionnal allows to run tarball JJB macro for both types of projects.
+if [ -r metadata.json ]; then
+    exit 0
+fi
+
 venv=${1:-venv}
 
 export UPPER_CONSTRAINTS_FILE=$(pwd)/upper-constraints.txt