From 36332a5d637f7b0363d517a21fa595e281fbb10e Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.anjos@idiap.ch>
Date: Fri, 19 Jan 2018 09:23:02 +0100
Subject: [PATCH] Set package version if version.txt is available

---
 conda/conda-build.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/conda/conda-build.sh b/conda/conda-build.sh
index e8b21d8..a38a143 100755
--- a/conda/conda-build.sh
+++ b/conda/conda-build.sh
@@ -11,4 +11,9 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 export CONDARC=${DIR}/build-condarc
 echo "Using CONDARC from \`${CONDARC}'..."
 
+if [ -e ${2}/../version.txt ]; then
+  export BOB_PACKAGE_VERSION=$(cat ${2}/../version.txt)
+  echo "Setting package version to \`${BOB_PACKAGE_VERSION}'..."
+fi
+
 conda build --no-anaconda-upload --variant-config-files ${DIR}/../gitlab/conda_build_config.yaml --python=${1} ${2}
-- 
GitLab