Skip to content
Snippets Groups Projects
Commit 2573f8d6 authored by Martyn Welch's avatar Martyn Welch
Browse files

Add missing support to generate OSTree URLs in shortcode


The shortcode is missing the ability to create URLs to ostree images. This
is vital since the download page should be serving OSTree images!

Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
parent 3d7dcbe3
Branches
No related tags found
1 merge request!120Tweaks to image download
Pipeline #165439 passed
......@@ -22,9 +22,9 @@ release images presented below for evaluation.
| Image | Optional Downloads |
| ----- | ------------------ |
| [Intel 64-bit (amd64)]({{< image-url Stable amd64 minimal >}}) | [bmap file]({{< image-url Stable amd64 minimal bmap >}}) |
| [ARM 32-bit (armhf)]({{< image-url Stable armhf minimal >}}) | [bmap file]({{< image-url Stable armhf minimal bmap >}}) |
| [ARM 64-bit (arm64)]({{< image-url Stable arm64 minimal >}}) | [bmap file]({{< image-url Stable arm64 minimal bmap >}}) |
| [Intel 64-bit (amd64)]({{< image-url Stable amd64 minimal ostree >}}) | [bmap file]({{< image-url Stable amd64 minimal ostree bmap >}}) |
| [ARM 32-bit (armhf)]({{< image-url Stable armhf minimal ostree >}}) | [bmap file]({{< image-url Stable armhf minimal ostree bmap >}}) |
| [ARM 64-bit (arm64)]({{< image-url Stable arm64 minimal ostree >}}) | [bmap file]({{< image-url Stable arm64 minimal ostree bmap >}}) |
- **Target**: A more featureful image, utilizing
[OSTree]({{< ref "guides/ostree.md" >}}) for updates, providing an example
......@@ -33,8 +33,8 @@ release images presented below for evaluation.
| Image | Optional Downloads |
| ----- | ------------------ |
| [Intel 64-bit (amd64)]({{< image-url Stable amd64 target >}}) | [bmap file]({{< image-url Stable amd64 target bmap >}}) |
| [ARM 32-bit (armhf)]({{< image-url Stable armhf target >}}) | [bmap file]({{< image-url Stable armhf target bmap >}}) |
| [Intel 64-bit (amd64)]({{< image-url Stable amd64 target ostree >}}) | [bmap file]({{< image-url Stable amd64 target ostree bmap >}}) |
| [ARM 32-bit (armhf)]({{< image-url Stable armhf target ostree >}}) | [bmap file]({{< image-url Stable armhf target ostree bmap >}}) |
{{% notice note %}}
No open graphical stack is available for the current stable release on the
......
......
......@@ -3,9 +3,13 @@
{{ $release := (.Get 0) }}
{{ $arch := (.Get 1) }}
{{ $type := (.Get 2) }}
{{ $variant := (.Get 3) }}
{{ $extra := (.Get 4) }}
{{ $scratch := newScratch }}
{{ $scratch.Set "variant" "" }}
{{ if eq $type "sdk" }}
{{ $scratch.Set "extension" ".vdi.gz" }}
{{ $scratch.Set "firmware" $type }}
......@@ -16,16 +20,20 @@
{{ else }}
{{ $scratch.Set "firmware" "uboot" }}
{{ end }}
{{ if eq $variant "ostree" }}
{{ $scratch.Set "variant" "_ostree" }}
{{ end }}
{{ if eq (.Get 3) "bmap" }}
{{ $scratch.Set "extension" ".img.bmap" }}
{{ end }}
{{ if eq $extra "bmap" }}
{{ $scratch.Set "extension" ".img.bmap" }}
{{ end }}
{{ $extension := $scratch.Get "extension" }}
{{ $firmware := $scratch.Get "firmware" }}
{{ $variant := $scratch.Get "variant" }}
{{ $version := (index .Site.Data.releases $release).version }}
{{ $revision := (index .Site.Data.releases $release).revision }}
{{ $baseurl }}/{{ $version }}/{{ $version }}.{{ $revision }}/{{ $arch }}/{{ $type }}/apertis_{{ $version }}-{{ $type }}-{{ $arch }}-{{ $firmware }}_{{ $version}}.{{ $revision }}{{ $extension }}
{{ $baseurl }}/{{ $version }}/{{ $version }}.{{ $revision }}/{{ $arch }}/{{ $type }}/apertis{{ $variant }}_{{ $version }}-{{ $type }}-{{ $arch }}-{{ $firmware }}_{{ $version}}.{{ $revision }}{{ $extension }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment