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

Commit

Permalink
Add body back to releases (#994)
Browse files Browse the repository at this point in the history
  • Loading branch information
drew-gross authored Mar 7, 2017
1 parent 6a5e61d commit 176421c
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions housekeeping/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ npm version patch -m "Bump version to %s. [ci skip]"
git push --quiet "https://$GH_TOKEN:x-oauth-basic@github.com/vshatskyi/black-screen.git" HEAD:master --tags > /dev/null 2>&1
npm run release

# NEW_RELEASE_TAG=$(git describe --abbrev=0)
# echo "($?) Current release tag: $NEW_RELEASE_TAG"
NEW_RELEASE_TAG=$(git describe --abbrev=0)
echo "($?) Current release tag: $NEW_RELEASE_TAG"

# PREVIOUS_RELEASE_TAG=$(git describe --abbrev=0 --tags "$NEW_RELEASE_TAG^")
# echo "($?) Previous release tag: $PREVIOUS_RELEASE_TAG"
PREVIOUS_RELEASE_TAG=$(git describe --abbrev=0 --tags "$NEW_RELEASE_TAG^")
echo "($?) Previous release tag: $PREVIOUS_RELEASE_TAG"

# NEW_RELEASE_LAST_DRAFT_ID=$(curl "https://$GH_TOKEN:x-oauth-basic@api.github.com/repos/vshatskyi/black-screen/releases/latest" | python -c "import json,sys; obj=json.load(sys.stdin); print obj['id'];")
# echo "($?) New release draft ID: $NEW_RELEASE_LAST_DRAFT_ID"
NEW_RELEASE_ID=$(curl "https://$GH_TOKEN:x-oauth-basic@api.github.com/repos/vshatskyi/black-screen/releases/latest" | python -c "import json,sys; obj=json.load(sys.stdin); print obj['id'];")
echo "($?) New release draft ID: $NEW_RELEASE_ID"

# NEW_RELEASE_BODY=$(git log --oneline --no-merges $NEW_RELEASE_TAG...$PREVIOUS_RELEASE_TAG | python -c "import json,sys; print json.dumps(sys.stdin.read());")
# echo "($?) Body:"
# echo $NEW_RELEASE_BODY
NEW_RELEASE_BODY=$(git log --oneline --no-merges $NEW_RELEASE_TAG...$PREVIOUS_RELEASE_TAG | python -c "import json,sys; print json.dumps(sys.stdin.read());")
echo "($?) Body:"
echo $NEW_RELEASE_BODY

# curl --request PATCH "https://$GH_TOKEN:x-oauth-basic@api.github.com/repos/vshatskyi/black-screen/releases/$NEW_RELEASE_LAST_DRAFT_ID" \
# -H "Content-Type: application/json" \
# -d "{\"body\": $NEW_RELEASE_BODY, \"draft\": false, \"prerelease\": false, \"tag_name\": \"$NEW_RELEASE_TAG\"}"
curl --request PATCH "https://$GH_TOKEN:x-oauth-basic@api.github.com/repos/vshatskyi/black-screen/releases/$NEW_RELEASE_ID" \
-H "Content-Type: application/json" \
-d "{\"body\": $NEW_RELEASE_BODY}"

0 comments on commit 176421c

Please sign in to comment.