summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rwxr-xr-xbuild/jenkins-build.sh20
1 files changed, 11 insertions, 9 deletions
diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh
index 1d5692a..e4a0535 100755
--- a/build/jenkins-build.sh
+++ b/build/jenkins-build.sh
@@ -8,14 +8,13 @@ else
export CIL_VERSION=`git describe --tags | tail -c +2`
# dash means that it's some commit after tag release -thus will be treated as dev
if [[ ${CIL_VERSION} == *"-"* ]]; then
- # detected dash means that it is dev version
- # version is then string-string and all after second dash is ignored (usually commit sha)
- export CIL_VERSION=`echo ${CIL_VERSION} | cut -d "-" -f -2`
- # but dash is prohibited for conda build, replace with underscore
- export CIL_VERSION=`echo ${CIL_VERSION} | tr - _`
- echo Building dev version ${CIL_VERSION}
+ # detected dash means that it is dev version,
+ # get first and second part between first dash and ignore all after other dash (usually sha)
+ # and as dash is prohibited for conda build, replace with underscore
+ export CIL_VERSION=`echo ${CIL_VERSION} | cut -d "-" -f -2 | tr - _`
+ echo Building dev version: ${CIL_VERSION}
else
- echo Defining version from last git tag and commit: $CIL_VERSION
+ echo Building release version: $CIL_VERSION
fi
fi
@@ -45,13 +44,16 @@ export REG_FILES=`conda build Wrappers/Python/conda-recipe --output`
# REG_FILES variable should contain output files
echo files created: $REG_FILES
-#upload to anaconda
+
+# upload to anaconda only if token is defined
+# and TODO pull request not to upload
+
if [[ -n ${CCPI_CONDA_TOKEN} ]]
then
conda install anaconda-client
while read -r outfile; do
#if 0 commit after tag then call anaconda without --label dev
- #TODO pull request not to upload
+
if [[ $CIL_VERSION == *"_"* ]]; then
# upload with dev label
anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev