Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 18 lines (12 sloc) 608 Bytes
#!/bin/bash
curl --silent -L https://api.github.com/repos/rdmtc/RedMatic/releases/latest > latest-release.json
LTAG=`jq -r '.tag_name' latest-release.json`
if [ "$LTAG" != "v$VERSION_ADDON" ]; then
echo "wrong release"
rm latest-release.json
exit 1
fi
RELEASE=`jq -r '.id' latest-release.json`
rm latest-release.json
echo "console.log(JSON.stringify({body: require('fs').readFileSync('./CHANGELOG.md').toString()}))" | node | curl -H "Authorization: token $GITHUB_OAUTH_TOKEN" -X PATCH --silent -L --data @- https://api.github.com/repos/rdmtc/RedMatic/releases/$RELEASE > /dev/null
exit $?
You can’t perform that action at this time.