Skip to content

Commit

Permalink
Fix Download links for v2 artifacts (#818)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
- Resolves #817

Signed-off-by: Yuri Shkuro <github@ysh.us>
  • Loading branch information
yurishkuro authored Dec 17, 2024
1 parent 9378fff commit 229b8b8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions themes/basetheme/layouts/shortcodes/binaries.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{ $latestXXX := .Site.Params.binariesLatest }}
{{/* The releases on GitHub are currently tagged with v1xx tag, so we use $latestV1 in the base URLs */}}
{{ $latestV1 := .Site.Params.binariesLatest }}
{{ $binaries := .Site.Data.download.binaries }}
{{ $platforms := $binaries.platforms }}
<table class="table is-striped">
Expand All @@ -15,9 +16,9 @@
<tbody>
{{ $versions := slice .Site.Params.binariesLatestV2 .Site.Params.binariesLatest }}
{{ range $latest := $versions }}
{{ $releaseUrl := printf "https://github.com/jaegertracing/jaeger/releases/tag/v%s" $latest }}
{{ $zipUrl := printf "https://github.com/jaegertracing/jaeger/archive/v%s.zip" $latest }}
{{ $tarUrl := printf "https://github.com/jaegertracing/jaeger/archive/v%s.tar.gz" $latest }}
{{ $releaseUrl := printf "https://github.com/jaegertracing/jaeger/releases/tag/v%s" $latestV1 }}
{{ $srcZipUrl := printf "https://github.com/jaegertracing/jaeger/archive/v%s.zip" $latestV1 }}
{{ $srcTarUrl := printf "https://github.com/jaegertracing/jaeger/archive/v%s.tar.gz" $latestV1 }}
<tr>
<td>
<strong>
Expand All @@ -34,7 +35,7 @@
{{ $name := $platform.name }}
{{ $icon := $platform.icon }}
{{ $asset := printf "jaeger-%s-%s-amd64.tar.gz" $latest $key }}
{{ $downloadUrl := printf "https://github.com/jaegertracing/jaeger/releases/download/v%s/%s" $latest $asset }}
{{ $downloadUrl := printf "https://github.com/jaegertracing/jaeger/releases/download/v%s/%s" $latestV1 $asset }}
{{ $zipUrl := printf "https://github.com/jaegertracing/jaeger/archive/v%s.zip" $latest }}
{{ $tarUrl := printf "https://github.com/jaegertracing/jaeger/archive/v%s.tar.gz" $latest }}
<a class="button is-medium is-{{ $key }}" href="{{ $downloadUrl }}" download>
Expand All @@ -46,15 +47,15 @@
</span>
</a>
{{ end }}
<a class="button is-medium is-zip" href="{{ $zipUrl }}" download>
<a class="button is-medium is-zip" href="{{ $srcZipUrl }}" download>
<span class="icon">
<i class="fas fa-file-archive"></i>
</span>
<span>
Source (.zip)
</span>
</a>
<a class="button is-medium is-tar" href="{{ $tarUrl }}" download>
<a class="button is-medium is-tar" href="{{ $srcTarUrl }}" download>
<span class="icon">
<i class="fas fa-file-archive"></i>
</span>
Expand All @@ -67,4 +68,4 @@
</tr>
{{ end }}
</tbody>
</table>
</table>

0 comments on commit 229b8b8

Please sign in to comment.