Skip to content

Commit

Permalink
Use github release notes on bintray
Browse files Browse the repository at this point in the history
  • Loading branch information
Piccirello committed Nov 12, 2019
1 parent dbae684 commit 08b388a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/publish-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ bintrayCreateVersion () {
echo "HTTP response code: $RESPONSE_CODE"
}

bintrayUseGitHubReleaseNotes () {
URL="https://api.bintray.com/packages/$SUBJECT/$REPO/$PACKAGE/versions/$VERSION"
BODY="{ \"vcs_tag\": \"v0.0.33\", \"github_use_tag_release_notes\": \"true\" }"
echo "Creating package version $VERSION"
RESPONSE_CODE=$(curl -X PATCH -d "$BODY" -H "Content-Type: application/json" -u$BINTRAY_USER:$BINTRAY_API_KEY $URL -s -w "%{http_code}" -o /dev/null);
if [[ "$(echo $RESPONSE_CODE | head -c2)" != "20" ]]; then
echo "Unable to create package version, HTTP response code: $RESPONSE_CODE"
exit 1
fi
echo "HTTP response code: $RESPONSE_CODE"
}

bintrayUpload () {
for i in $FILES; do
FILENAME=${i##*/}
Expand Down Expand Up @@ -97,6 +109,7 @@ listDebianArtifacts
getVersion
printMeta
bintrayCreateVersion
bintrayUseGitHubReleaseNotes
setUploadDirPath
bintrayUpload
snooze
Expand Down
13 changes: 13 additions & 0 deletions scripts/publish-rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ bintrayCreateVersion () {
echo "HTTP response code: $RESPONSE_CODE"
}

bintrayUseGitHubReleaseNotes () {
URL="https://api.bintray.com/packages/$SUBJECT/$REPO/$PACKAGE/versions/$VERSION"
BODY="{ \"vcs_tag\": \"v0.0.33\", \"github_use_tag_release_notes\": \"true\" }"
echo "Creating package version $VERSION"
RESPONSE_CODE=$(curl -X PATCH -d "$BODY" -H "Content-Type: application/json" -u$BINTRAY_USER:$BINTRAY_API_KEY $URL -s -w "%{http_code}" -o /dev/null);
if [[ "$(echo $RESPONSE_CODE | head -c2)" != "20" ]]; then
echo "Unable to create package version, HTTP response code: $RESPONSE_CODE"
exit 1
fi
echo "HTTP response code: $RESPONSE_CODE"
}

bintrayUpload () {
for i in $FILES; do
FILENAME=${i##*/}
Expand Down Expand Up @@ -93,6 +105,7 @@ listRpmArtifacts
getVersion
printMeta
bintrayCreateVersion
bintrayUseGitHubReleaseNotes
bintrayUpload
snooze
bintraySetDownloads

0 comments on commit 08b388a

Please sign in to comment.