diff options
author | Tomas Kulhanek <tomas.kulhanek@stfc.ac.uk> | 2019-01-22 14:43:14 +0000 |
---|---|---|
committer | Tomas Kulhanek <tomas.kulhanek@stfc.ac.uk> | 2019-01-22 14:43:14 +0000 |
commit | e7f26cab5e6522d521c6b0e42f1991c3e7c0ac7d (patch) | |
tree | cf32f766e183a3f01779df669ab71b2b6d828342 | |
parent | 74bfad3cfa5462856d03872c02229423f9a36b9f (diff) | |
download | regularization-e7f26cab5e6522d521c6b0e42f1991c3e7c0ac7d.tar.gz regularization-e7f26cab5e6522d521c6b0e42f1991c3e7c0ac7d.tar.bz2 regularization-e7f26cab5e6522d521c6b0e42f1991c3e7c0ac7d.tar.xz regularization-e7f26cab5e6522d521c6b0e42f1991c3e7c0ac7d.zip |
UPDATE 2: check git branch, upload master build
-rwxr-xr-x | build/jenkins-build.sh | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 840afac..03de4e6 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -50,19 +50,21 @@ echo files created: $REG_FILES GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` echo on branch ${GIT_BRANCH} -if [[ -n ${CCPI_CONDA_TOKEN} && ${GIT_BRANCH}=="master" ]] -then - conda install anaconda-client - while read -r outfile; do - #if 0 commit after tag then call anaconda without --label dev - - if [[ $CIL_VERSION == *"_"* ]]; then - # upload with dev label - anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev - else - anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force - fi - done <<< "$REG_FILES" +if [[ -n ${CCPI_CONDA_TOKEN} ]]; then + if [[ ${GIT_BRANCH}=="master" ]]; then + conda install anaconda-client + while read -r outfile; do + #if >0 commit (some _ in version) then marking as dev build + if [[ $CIL_VERSION == *"_"* ]]; then + # upload with dev label + anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev + else + anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force + fi + done <<< "$REG_FILES" + else + echo git branch is not master, will not upload to anaconda. + fi else - echo CCPI_CONDA_TOKEN not defined or git branch is not master, will not upload to anaconda. + echo CCPI_CONDA_TOKEN not defined, will not upload to anaconda. fi |