pulumi-hugo-cn/themes/default/layouts/shortcodes/changelog-table-row.html

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.7 KiB
HTML
Raw Permalink Normal View History

{{ $version := .Get "version" }}
{{ if not $version }}
{{ errorf "missing value for param 'version': %s" .Position }}
{{ end }}
{{ $flatVersion := replace $version "." "" }}
{{ $date := .Get "date" }}
{{ if not $date }}
{{ errorf "missing value for param 'date': %s" .Position }}
{{ end }}
{{ if ne (len (split $date "-")) 3 }}
{{ errorf "invalid number of components for param 'date': %s" .Position }}
{{ end }}
{{ $exclude := split (.Get "exclude") "," }}
{{ $showChecksum := .Get "showChecksum" }}
<tr>
<td><a href="https://github.com/pulumi/pulumi/blob/master/CHANGELOG.md#{{ $flatVersion }}-{{ $date }}">{{ $version }}</a></td>
<td>{{ $date }}</td>
<td>{{ template "dl" (dict "exclude" $exclude "version" $version "platform" "linux" "ext" "tar.gz" "display" "Linux") }}</td>
<td>{{ template "dl" (dict "exclude" $exclude "version" $version "platform" "darwin" "ext" "tar.gz" "display" "macOS") }}</td>
<td>{{ template "dl" (dict "exclude" $exclude "version" $version "platform" "windows" "ext" "zip" "display" "Windows") }}</td>
<td>{{ template "checksum" (dict "showChecksum" $showChecksum "version" $version) }}</td>
</tr>
{{ define "dl" }}
{{ if in .exclude .platform }}
<span class="text-sm text-gray-500">unavailable</span>
{{ else }}
<a href="https://get.pulumi.com/releases/sdk/pulumi-v{{ .version }}-{{ .platform }}-x64.{{ .ext }}">{{ .display }}</a>
{{ end }}
{{ end }}
{{ define "checksum" }}
{{ if .showChecksum }}
<a href="https://get.pulumi.com/releases/sdk/pulumi-{{ .version }}-checksums.txt">Checksums</a>
{{ else }}
<span class="text-sm text-gray-500">--</span>
{{ end }}
{{ end }}