diff options
author | Tomas Kulhanek <tomas.kulhanek@stfc.ac.uk> | 2019-01-22 14:14:33 +0000 |
---|---|---|
committer | Tomas Kulhanek <tomas.kulhanek@stfc.ac.uk> | 2019-01-22 14:14:33 +0000 |
commit | 74bfad3cfa5462856d03872c02229423f9a36b9f (patch) | |
tree | c901f0b50e2981f0bdfc1a2c455acc1b5f2a9e1f /build | |
parent | 440693750ee94044f4f0bcd7c5e737487bfb6e64 (diff) | |
download | regularization-74bfad3cfa5462856d03872c02229423f9a36b9f.tar.gz regularization-74bfad3cfa5462856d03872c02229423f9a36b9f.tar.bz2 regularization-74bfad3cfa5462856d03872c02229423f9a36b9f.tar.xz regularization-74bfad3cfa5462856d03872c02229423f9a36b9f.zip |
UPDATE: check git branch, upload master build
Diffstat (limited to 'build')
-rwxr-xr-x | build/jenkins-build.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 7ac4539..840afac 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -32,6 +32,7 @@ else ./Miniconda3-latest-Linux-x86_64.sh -u -b -p . PATH=$PATH:./bin fi + # presume that git clone is done before this script is launched, if not, uncomment #git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit conda install -y conda-build @@ -46,8 +47,10 @@ echo files created: $REG_FILES # upload to anaconda only if token is defined # and TODO pull request not to upload +GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` +echo on branch ${GIT_BRANCH} -if [[ -n ${CCPI_CONDA_TOKEN} ]] +if [[ -n ${CCPI_CONDA_TOKEN} && ${GIT_BRANCH}=="master" ]] then conda install anaconda-client while read -r outfile; do @@ -61,5 +64,5 @@ then fi done <<< "$REG_FILES" else - echo CCPI_CONDA_TOKEN not defined, will not upload to anaconda. + echo CCPI_CONDA_TOKEN not defined or git branch is not master, will not upload to anaconda. fi |