diff options
author | Tomas Kulhanek <tomas.kulhanek@stfc.ac.uk> | 2019-01-22 12:08:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-22 12:08:13 +0000 |
commit | 7c9c66198cba8e1b83d0e1c57a150aae4e3644f6 (patch) | |
tree | fa793abfed5e54c5628e92460edee523bc993ed7 /build | |
parent | 33a8d8c331efa050fe3591808942099f9646c389 (diff) | |
parent | ec5d74d59a26192288f1430581e2a27567f91b86 (diff) | |
download | regularization-7c9c66198cba8e1b83d0e1c57a150aae4e3644f6.tar.gz regularization-7c9c66198cba8e1b83d0e1c57a150aae4e3644f6.tar.bz2 regularization-7c9c66198cba8e1b83d0e1c57a150aae4e3644f6.tar.xz regularization-7c9c66198cba8e1b83d0e1c57a150aae4e3644f6.zip |
Merge pull request #3 from TomasKulhanek/pr-test
Update jenkins-build.sh test 32
Diffstat (limited to 'build')
-rwxr-xr-x | build/jenkins-build.sh | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 7d54d3a..1d5692a 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -4,19 +4,20 @@ if [[ -n ${CIL_VERSION} ]] then echo Using defined version: $CIL_VERSION else - -#get tag, remove first char ('v') and leave rest -export CIL_VERSION=`git describe --tags | tail -c +2` -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} -else - echo Defining version from last git tag and commit: $CIL_VERSION -fi + # define CIL_VERSION from last git tag, remove first char ('v') and leave rest + 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} + else + echo Defining version from last git tag and commit: $CIL_VERSION + fi +fi # Script to builds source code in Jenkins environment # module try-load conda @@ -50,7 +51,7 @@ then conda install anaconda-client while read -r outfile; do #if 0 commit after tag then call anaconda without --label dev - #TODO if pull request??? do not upload + #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 |