Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
stoyicker committed Apr 18, 2021
1 parent 81f8077 commit fad4ad3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .circleci/release_github.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
#!/bin/bash
set -e
set -xe

uploadReleaseToGitHub() {
git fetch --tags
THIS_TAG=$(git describe --tags --abbrev=0)

echo "This tag: $THIS_TAG"

BODY="{
\"tag_name\": \"$THIS_TAG\",
\"target_commitish\": \"master\",
\"name\": \"$THIS_TAG\",
\"body\": \" \"
}"

echo "url: https://api.github.com/repos/${REPO_SLUG}/releases"

# Create the release in GitHub and extract its id from the response
RESPONSE_BODY=$(curl -s \
-v \
Expand All @@ -25,10 +29,13 @@ uploadReleaseToGitHub() {
# Extract the upload_url value
UPLOAD_URL=$(echo ${RESPONSE_BODY} | jq -r .upload_url)

echo "Upload url: $UPLOAD_URL"

cp annotations/build/libs/annotations.jar .

# Attach annotations
ANNOTATIONS_UPLOAD_URL=$(echo ${UPLOAD_URL} | sed "s/{?name,label}/?name=annotations-${THIS_TAG}.jar/")
echo "Annotations upload url: ${ANNOTATIONS_UPLOAD_URL}"
curl -s \
-v \
-u ${CIRCLE_USERNAME}:${GITHUB_TOKEN} \
Expand All @@ -42,6 +49,7 @@ uploadReleaseToGitHub() {

# Attach processor-java
PROCESSOR_JAVA_UPLOAD_URL=$(echo ${UPLOAD_URL} | sed "s/{?name,label}/?name=processor-java-${THIS_TAG}.jar/")
echo "Processor java upload url: ${PROCESSOR_JAVA_UPLOAD_URL}"
curl -s \
-v \
-u ${CIRCLE_USERNAME}:${GITHUB_TOKEN} \
Expand Down

0 comments on commit fad4ad3

Please sign in to comment.