f
parent
d42bb96c3c
commit
13ab88ee33
7
lib
7
lib
|
@ -19,6 +19,9 @@ function create-release(){
|
||||||
LATEST_RELEASE_ID=$(jq -r '.[] | select(.tag_name=="latest") | .id' <<< $RELEASE_LIST)
|
LATEST_RELEASE_ID=$(jq -r '.[] | select(.tag_name=="latest") | .id' <<< $RELEASE_LIST)
|
||||||
delete-release $LATEST_RELEASE_ID
|
delete-release $LATEST_RELEASE_ID
|
||||||
delete-tag
|
delete-tag
|
||||||
|
RELEASE_TAG="$1"
|
||||||
|
else
|
||||||
|
RELEASE_TAG="$1-$DRONE_BRANCH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
COMMIT_SHA=$(git rev-parse HEAD)
|
COMMIT_SHA=$(git rev-parse HEAD)
|
||||||
|
@ -30,9 +33,9 @@ function create-release(){
|
||||||
-H 'Authorization: Bearer 10e4af53e553aacb905766512e36487492d61a66' \
|
-H 'Authorization: Bearer 10e4af53e553aacb905766512e36487492d61a66' \
|
||||||
-d '{
|
-d '{
|
||||||
"draft": false,
|
"draft": false,
|
||||||
"name": "'"release $1-$DRONE_BRANCH"'",
|
"name": "'"release $RELEASE_TAG"'",
|
||||||
"prerelease": false,
|
"prerelease": false,
|
||||||
"tag_name": "'"$1-$DRONE_BRANCH"'",
|
"tag_name": "'"$RELEASE_TAG"'",
|
||||||
"target_commitish": "'"$COMMIT_SHA"'"
|
"target_commitish": "'"$COMMIT_SHA"'"
|
||||||
}')
|
}')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue