summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorTomas Kulhanek <tomas.kulhanek@stfc.ac.uk>2019-01-22 12:05:16 +0000
committerGitHub <noreply@github.com>2019-01-22 12:05:16 +0000
commitec5d74d59a26192288f1430581e2a27567f91b86 (patch)
treea5a62ccc960ae6e5069c51d879c755b6a7f11f55 /build
parent6c497653590f6c916496f1eb2f464d97d63b1ae9 (diff)
downloadregularization-ec5d74d59a26192288f1430581e2a27567f91b86.tar.gz
regularization-ec5d74d59a26192288f1430581e2a27567f91b86.tar.bz2
regularization-ec5d74d59a26192288f1430581e2a27567f91b86.tar.xz
regularization-ec5d74d59a26192288f1430581e2a27567f91b86.zip
Update jenkins-build.sh
Diffstat (limited to 'build')
-rwxr-xr-xbuild/jenkins-build.sh29
1 files changed, 15 insertions, 14 deletions
diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh
index de22368..e440717 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
@@ -49,7 +50,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