From 21531db00dcf5c24389c5f55a3927ad28d0d7de5 Mon Sep 17 00:00:00 2001 From: Manu Date: Wed, 21 Nov 2018 14:08:37 +0800 Subject: [PATCH] Add templates to render appcast.xml on gh-pages. --- appcast-pre.xml | 4 ++++ appcast.inc | 34 ++++++++++++++++++++++++++++++++++ appcast.xml | 4 ++++ 3 files changed, 42 insertions(+) create mode 100644 appcast-pre.xml create mode 100644 appcast.inc create mode 100644 appcast.xml diff --git a/appcast-pre.xml b/appcast-pre.xml new file mode 100644 index 00000000..8563cbe1 --- /dev/null +++ b/appcast-pre.xml @@ -0,0 +1,4 @@ +--- +release_only: false +--- +{%include appcast.inc %} diff --git a/appcast.inc b/appcast.inc new file mode 100644 index 00000000..dbe96bbe --- /dev/null +++ b/appcast.inc @@ -0,0 +1,34 @@ + + + + {{ site.github.project_title }} + Most recent changes with links to updates. + en + {% for release in site.github.releases %} + {% unless release.draft %} + {% unless release.prerelease and page.release_only %} + + {{ release.name }} + + {{ release.published_at | date_to_rfc822 }} + {% for asset in release.assets limit:1 %} + {% assign build_nums = asset.name | replace_first:'Project.v','' | replace_first:'.b',',' | remove_first:'.zip' | split:',' %} + {% if build_nums.size == 2 %} + {% assign version = build_nums[1] %} + {% assign short_version = release.tag_name | remove_first:'v' %} + {% else %} + {% assign version = release.tag_name | remove_first:'v' %} + {% endif %} + + {% endfor %} + + {% endunless %} + {% endunless %} + {% endfor %} + + diff --git a/appcast.xml b/appcast.xml new file mode 100644 index 00000000..19ea174c --- /dev/null +++ b/appcast.xml @@ -0,0 +1,4 @@ +--- +release_only: true +--- +{%include appcast.inc %}