diff --git a/Makefile b/Makefile index 7edea54..c4b2f42 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,13 @@ -test: downloadlinks changelog releasejs +test: downloadlinks hugo server -w --logLevel info --bind 0.0.0.0 -release: downloadlinks changelog releasejs +release: downloadlinks hugo deploy: release rsync --chown www-data:www-data -avz --delete --exclude 'forum/' --exclude 'codedoc/' docs/ pioneer:/var/www/pioneerspacesim.net/ downloadlinks: python3 make-downloadlinks.py > layouts/partials/generated/downloadlinks.html + +# Unused changelog: python3 make-changelog.py > layouts/partials/generated/changelog.html releasejs: diff --git a/content/page/download.md b/content/page/download.md index 11df2f7..f13fe12 100644 --- a/content/page/download.md +++ b/content/page/download.md @@ -24,4 +24,4 @@ See the [compiling guide](https://github.com/pioneerspacesim/pioneer/blob/master ## Changelog -{{< changelog >}} +For list of full development history, see [Changelog.txt](https://github.com/pioneerspacesim/pioneer/blob/master/Changelog.txt) diff --git a/make-changelog.py b/make-changelog.py index 4e8aa79..e1e6c7a 100755 --- a/make-changelog.py +++ b/make-changelog.py @@ -1,3 +1,7 @@ +""" +Generate changelog for latest month. +""" + #!/usr/bin/python import collections import re @@ -7,6 +11,7 @@ changelog = urllib.request.urlopen('https://raw.githubusercontent.com/pioneerspacesim/pioneer/master/Changelog.txt').read().decode('utf-8') for line in changelog.splitlines(): if firstline: + # Get title: "Month YYYY" lines.append((0, line.strip())) firstline = False elif len(line) == 0: diff --git a/make-downloadlinks.py b/make-downloadlinks.py index 8903fbc..31f7e19 100755 --- a/make-downloadlinks.py +++ b/make-downloadlinks.py @@ -1,12 +1,19 @@ #!/usr/bin/python import json +import re import urllib.request + import markdown + with urllib.request.urlopen('https://api.github.com/repos/pioneerspacesim/pioneer/releases/latest') as json_file: latest = json.load(json_file) assets = latest['assets'] title = latest['name'] body = markdown.markdown(latest['body']) + + # Make issue tags "(#)" clickable + body = re.sub(r'#(\d+)', r'#\1', body.strip().lstrip(' *')) + print(f'

Release: {title}

') print('') print(f'

{body}

') - diff --git a/make-release-js.py b/make-release-js.py index 1d71a35..037b203 100755 --- a/make-release-js.py +++ b/make-release-js.py @@ -18,6 +18,9 @@ elif "linux" in name: tag = "Lin64" name = "Linux 64" + elif "App" in name: + tag = "App" + name = "App Image Linux 64" else: tag = "Unk" name = "Unknown"