Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
[Build] Don't story intermediate BODY results.
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-shatskyi committed May 31, 2016
1 parent 0cb2faa commit dc30d0d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions housekeeping/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ npm version patch -m "Bump version to %s. [ci skip]"
npm run release
git push --quiet "https://$GH_TOKEN:x-oauth-basic@github.com/shockone/black-screen.git" HEAD:master --tags > /dev/null 2>&1

echo "Git version: $(git --version)"

TAG_NAME=$(git describe --abbrev=0)
echo "($?) Current tag: $TAG_NAME"

Expand All @@ -17,14 +15,10 @@ echo "($?) Previous tag: $PREVIOUS_TAG_NAME"
LAST_DRAFT_ID=$(curl "https://$GH_TOKEN:x-oauth-basic@api.github.com/repos/shockone/black-screen/releases" | python -c "import json,sys; array=json.load(sys.stdin); print array[0]['id'];")
echo "($?) Last draft ID: $LAST_DRAFT_ID"

BODY=$(git log --pretty=format:'%h% %d %s\\n' --abbrev-commit --no-merges $TAG_NAME...$PREVIOUS_TAG_NAME)
BODY=$(git log --oneline --no-merges $TAG_NAME...$PREVIOUS_TAG_NAME | python -c "import json,sys; print json.dumps(sys.stdin.read());")
echo "($?) Body:"
echo $BODY

ESCAPED_BODY=$(echo $BODY | tr '"' "'")
echo "($?) Escaped body:"
echo $ESCAPED_BODY

curl --request PATCH "https://$GH_TOKEN:x-oauth-basic@api.github.com/repos/shockone/black-screen/releases/$LAST_DRAFT_ID" \
-H "Content-Type: application/json" \
-d "{\"body\":\"$ESCAPED_BODY\", \"draft\": false, \"prerelease\": true, \"tag_name\": \"$TAG_NAME\"}"
-d "{\"body\": $BODY, \"draft\": false, \"prerelease\": true, \"tag_name\": \"$TAG_NAME\"}"

0 comments on commit dc30d0d

Please sign in to comment.