From 444a29c95e8759c2dbc696351fc128e822ca598b Mon Sep 17 00:00:00 2001 From: Zach Leslie Date: Sat, 10 Feb 2018 11:29:26 -0800 Subject: [PATCH] Fetch the tags and echo to avoid failure --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index badd129..25ad4ac 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,10 +21,11 @@ pipeline { } steps { + sh 'git fetch --all --tags' sh '. .env.sh && bundle exec rake clean' sh '. .env.sh && bundle exec rake build' - sh '[ "$(git rev-list -n 1 $(git tag | tail -n 1 ))" == "$(git rev-list -n 1 HEAD)" ] && bundle exec rake publish pkg/*.tar.gz' + sh '[ "$(git rev-list -n 1 $(git tag | tail -n 1 ))" == "$(git rev-list -n 1 HEAD)" ] && bundle exec rake publish pkg/*.tar.gz || echo HEAD is not a tag' } } }