From 75196bd2777f3e1910a91723142369e34ab0d0cf Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 9 Aug 2019 21:54:10 +0100 Subject: [PATCH] Use new GIT_TAG_NAME and GIT_REF_TYPE laminar environment variables --- build | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build b/build index e28b0f5..55bb594 100755 --- a/build +++ b/build @@ -122,10 +122,17 @@ task_upload-release() { } task_ci() { + task_begin "Checking environment"; + check_env_variable "ARCHIVE"; + check_env_variable "GIT_REF_NAME"; + check_env_variable "GIT_REF_TYPE"; + check_env_variable "GIT_TAG_NAME"; + task_end 0; + tasks_run setup build package archive; - if [[ "$(git tag --points-at HEAD | wc -l)" -gt 0 ]]; then - echo "Found tag $(git tag --points-at HEAD), uploading release"; + if [[ "${GIT_REF_TYPE}" == "tags" ]]; then + echo "Found tag ${GIT_TAG_NAME}, uploading release"; tasks_run upload-release; fi }