chore: Parse changelog in markdown into html

when publishing release.
This commit is contained in:
Terry Geng 2020-07-08 09:50:50 +08:00
parent 95b1bb467e
commit 6133c6f0b5
No known key found for this signature in database
GPG Key ID: F982F8EA1DF720E7
2 changed files with 3 additions and 3 deletions

View File

@ -53,14 +53,14 @@ steps:
- name: deploy-stable
image: debian
commands:
- apt-get -qq update && apt-get -qq install jq curl git > /dev/null
- apt-get -qq update && apt-get -qq install jq curl git pandoc > /dev/null
- sed -i 's/target_version = git/target_version = stable/' configuration.default.ini
- git fetch --tags
- version=$(git describe --abbrev=0 --tags)
- echo "version is $version"
- echo $version > /mnt/botamusique/version
- sed -i "s/version = 'git'/version = '$version'/" mumbleBot.py
- curl --silent "https://api.github.com/repos/azlux/botamusique/releases/latest" | jq -r '.body' > /mnt/botamusique/changelog
- curl --silent "https://api.github.com/repos/azlux/botamusique/releases/latest" | jq -r '.body' | pandoc --from gfm --to html - --output - > /mnt/botamusique/changelog
- rm -rf .git*
- rm -rf web
- mkdir /tmp/botamusique

View File

@ -178,7 +178,7 @@ class MumbleBot:
last_startup_version = var.db.get("bot", "version", fallback=None)
if not last_startup_version or version.parse(last_startup_version) < version.parse(self.version):
var.db.set("bot", "version", self.version)
changelog = util.fetch_changelog().replace("\n", "<br>")
changelog = util.fetch_changelog()
self.send_channel_msg(constants.strings("update_successful", version=self.version, changelog=changelog))
# Set the CTRL+C shortcut