Initial ci/cd + release config
This commit is contained in:
13
.circleci/release_name.bash
Executable file
13
.circleci/release_name.bash
Executable 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
|
Reference in New Issue
Block a user