Use new GIT_TAG_NAME and GIT_REF_TYPE laminar environment variables

This commit is contained in:
Starbeamrainbowlabs 2019-08-09 21:54:10 +01:00
parent 1040b53b3a
commit 75196bd277
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 9 additions and 2 deletions

11
build
View File

@ -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
}