t
continuous-integration/drone/push Build is failing Details

pull/4/head
Dmitry Kirdyashkin 2023-07-23 15:25:58 +03:00
parent 23f04cbc40
commit 1bcc620dd4
1 changed files with 9 additions and 3 deletions

12
lib
View File

@ -7,9 +7,15 @@ function create-archive(){
zip -r -9 ./release/module.zip ./src/*
}
function create-varfile(){
RELEASE_TAG=$(echo $DRONE_COMMIT_MESSAGE | tr -d '\n')-$DRONE_BRANCH
COMMIT_SHA=$(git rev-parse HEAD)
echo $RELEASE_TAG >> vars
echo $COMMIT_SHA >> vars
}
function set-variables(){
export RELEASE=$(echo $DRONE_COMMIT_MESSAGE | tr -d '\n')-$DRONE_BRANCH
echo "$RELEASE"
source ./vars
envsubst < module.json.template > ./module.json
cat ./module.json
}
@ -21,7 +27,7 @@ function create-commit(){
}
function create-release(){
COMMIT_SHA=$(git rev-parse HEAD)
source ./vars
RESPONSE=$(curl \
-X 'POST' \
-Url "https://gitea.kdiva.ru/api/v1/repos/${DRONE_REPO}/releases" \