Initial ci/cd + release config

This commit is contained in:
Piotr Mścichowski
2019-08-01 11:21:59 +02:00
parent a652a0809c
commit 02d8fb5d8c
2 changed files with 189 additions and 0 deletions

13
.circleci/release_name.bash Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
release=$(curl -s "https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/releases")
tag=$(echo ${release} | jq -r ".[0].tag_name")
tag_name=$(echo ${release} | jq -r ".[0].name")
if [[ -n "$tag_name" ]]; then
echo "export RELEASE_NAME=$tag_name" >> $BASH_ENV
elif [[ -n "$tag" ]]; then
echo "export RELEASE_NAME=$tag" >> $BASH_ENV
else
echo "export RELEASE_NAME=$CIRCLE_SHA1" >> $BASH_ENV
fi