Skip to content

Commit a233514

Browse files
authored
Improve multi-arch links detection by a generic solution and add Windows (arm64) to 6.0 release (#810)
* Use a generic way for multi-arch download links * Add ARM64 release of Windows 10 toolchain
1 parent ee91933 commit a233514

File tree

10 files changed

+31
-15
lines changed

10 files changed

+31
-15
lines changed

_data/builds/swift_releases.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,6 +1807,7 @@
18071807
docker: Coming Soon #6.0-windowsservercore-ltsc2022
18081808
archs:
18091809
- x86_64
1810+
- arm64
18101811
- name: Static SDK
18111812
platform: static-sdk
18121813
checksum: 7984c2cf175bde52ba6ea1fcbe27fc4a148a6237c41c719209c9288ed3ceb652

_includes/install/_build_release.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
{% assign tag_downcase = site.data.builds.swift_releases.last.tag | downcase %}
55
{% assign platform_name_url = include.platform | remove: '.' | remove: ' ' | downcase %}
66
{% assign platform_name = include.platform | remove : ' ' | downcase %}
7+
{% assign platform = site.data.builds.swift_releases.last.platforms | where: 'dir', include.platform_name_url | first %}
8+
{% unless platform %}
9+
{% assign platform = site.data.builds.swift_releases.last.platforms | where: 'name', include.platform | first %}
10+
{% endunless %}
711

812
<ul class="install-instruction">
913
<li class="resource">
@@ -19,17 +23,21 @@
1923
<p class="description">
2024
Tarball packages (.tar.gz)
2125
<ul>
22-
<li>Signature (PGP): <a href="https://download.swift.org/{{ tag_downcase }}/{{ platform_name_url }}/{{ tag }}/{{ tag }}-{{ platform_name }}.tar.gz.sig" >x86_64</a>{% if include.aarch64 %} | <a href="https://download.swift.org/{{ tag_downcase }}/{{ platform_name_url }}-aarch64/{{ tag }}/{{ tag }}-{{ platform_name }}-aarch64.tar.gz.sig">aarch64</a>{% endif %}</li>
26+
<li>Signature (PGP):{{ ' ' }}
27+
{%- for arch in platform.archs -%}
28+
{%- unless forloop.first %} | {% endunless -%}
29+
<a href="https://download.swift.org/{{ tag_downcase }}/{{ platform_name_url }}{% if arch != "x86_64" %}-{{ arch }}{% endif %}/{{ tag }}/{{ tag }}-{{ platform_name }}{% if arch != "x86_64" %}-{{ arch }}{% endif %}.tar.gz.sig" >
30+
{{- arch -}}
31+
</a>
32+
{%- endfor -%}
33+
</li>
2334
</ul>
2435
</p>
25-
{% if include.aarch64 %}
2636
<ul class="install-instruction">
27-
<a href="https://download.swift.org/{{ tag_downcase }}/{{ platform_name_url }}/{{ tag }}/{{ tag }}-{{ platform_name }}.tar.gz" class="cta-secondary">Download (x86_64)</a>
28-
<a href="https://download.swift.org/{{ tag_downcase }}/{{ platform_name_url }}-aarch64/{{ tag }}/{{ tag }}-{{ platform_name }}-aarch64.tar.gz" class="cta-secondary">Download (aarch64)</a>
37+
{% for arch in platform.archs %}
38+
<a href="https://download.swift.org/{{ tag_downcase }}/{{ platform_name_url }}{% if arch != "x86_64" %}-{{ arch }}{% endif %}/{{ tag }}/{{ tag }}-{{ platform_name }}{% if arch != "x86_64" %}-{{ arch }}{% endif %}.tar.gz" class="cta-secondary">Download ({{ arch }})</a>
39+
{% endfor %}
2940
</ul>
30-
{% else %}
31-
<a href="https://download.swift.org/{{ tag_downcase }}/{{ platform_name_url }}/{{ tag }}/{{ tag }}-{{ platform_name }}.tar.gz" class="cta-secondary">Download (x86_64)</a>
32-
{% endif %}
3341
<a href="/install/linux/tarball" class="cta-secondary">Instructions</a>
3442
</li>
3543
</ul>

install/linux/amazonlinux/2/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: Install Swift
99

1010
{% include install/_os_versions_tabs.md os_versions=site.data.install.amazonlinux name="Amazon Linux" pressed="Amazon Linux 2" %}
1111

12-
{% include install/_build_release.md platform="Amazon Linux 2" docker_tag="amazonlinux2" aarch64="true" rpm="true"%}
12+
{% include install/_build_release.md platform="Amazon Linux 2" docker_tag="amazonlinux2" rpm="true"%}
1313

1414
{% include install/_build_snapshot.md platform="Amazon Linux 2"
1515
aarch64="true"

install/linux/debian/12/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ title: Install Swift
99

1010
{% include install/_os_versions_tabs.md os_versions=site.data.install.debian name="Debian" pressed="Debian 12" %}
1111

12-
{% include install/_build_release.md platform="Debian 12" docker_tag="debian12" aarch64="true" %}
12+
{% include install/_build_release.md platform="Debian 12" docker_tag="debian12" %}

install/linux/fedora/39/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ title: Install Swift
99

1010
{% include install/_os_versions_tabs.md os_versions=site.data.install.fedora name="Fedora" pressed="Fedora 39" %}
1111

12-
{% include install/_build_release.md platform="Fedora 39" docker_tag="fedora39" aarch64="true" %}
12+
{% include install/_build_release.md platform="Fedora 39" docker_tag="fedora39" %}

install/linux/ubi/9/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: Install Swift
99

1010
{% include install/_os_versions_tabs.md os_versions=site.data.install.ubi name="Red Hat Universal Base Image" pressed="Red Hat Universal Base Image 9" %}
1111

12-
{% include install/_build_release.md platform="UBI 9" docker_tag="rhel-ubi9" aarch64="true"%}
12+
{% include install/_build_release.md platform="UBI 9" docker_tag="rhel-ubi9" %}
1313

1414
{% include install/_build_snapshot.md platform="ubi 9"
1515
aarch64="true"

install/linux/ubuntu/20_04/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: Install Swift
99

1010
{% include install/_os_versions_tabs.md os_versions=site.data.install.ubuntu name="Ubuntu" pressed="Ubuntu 20.04" %}
1111

12-
{% include install/_build_release.md platform="Ubuntu 20.04" docker_tag="focal" aarch64="true"%}
12+
{% include install/_build_release.md platform="Ubuntu 20.04" docker_tag="focal" %}
1313

1414
{% include install/_build_snapshot.md platform="Ubuntu 20.04"
1515
aarch64="true"

install/linux/ubuntu/22_04/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: Install Swift
99

1010
{% include install/_os_versions_tabs.md os_versions=site.data.install.ubuntu name="Ubuntu" pressed="Ubuntu 22.04" %}
1111

12-
{% include install/_build_release.md platform="Ubuntu 22.04" docker_tag="jammy" aarch64="true"%}
12+
{% include install/_build_release.md platform="Ubuntu 22.04" docker_tag="jammy" %}
1313

1414
{% include install/_build_snapshot.md platform="Ubuntu 22.04"
1515
aarch64="true"

install/linux/ubuntu/24_04/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ title: Install Swift
99

1010
{% include install/_os_versions_tabs.md os_versions=site.data.install.ubuntu name="Ubuntu" pressed="Ubuntu 24.04" %}
1111

12-
{% include install/_build_release.md platform="Ubuntu 24.04" docker_tag="noble" aarch64="true"%}
12+
{% include install/_build_release.md platform="Ubuntu 24.04" docker_tag="noble" %}

install/windows/index.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ title: Install Swift
77

88
## Latest Release (Swift {{ site.data.builds.swift_releases.last.name }})
99

10+
{% assign tag = site.data.builds.swift_releases.last.tag %}
11+
{% assign platform = site.data.builds.swift_releases.last.platforms | where: 'name', 'Windows 10' | first %}
12+
1013
<ul class="install-instruction">
1114
<li class="resource">
1215
<h3>Package Manager</h3>
@@ -20,7 +23,11 @@ title: Install Swift
2023
<p class="description">
2124
Package installers (.exe).
2225
</p>
23-
<a href="https://download.swift.org/{{ site.data.builds.swift_releases.last.tag | downcase }}/windows10/{{ site.data.builds.swift_releases.last.tag }}/{{ site.data.builds.swift_releases.last.tag }}-windows10.exe" class="cta-secondary">Download (x86_64)</a>
26+
<ul class="install-instruction">
27+
{% for arch in platform.archs %}
28+
<a href="https://download.swift.org/{{ tag | downcase }}/windows10{% if arch != "x86_64" %}-{{ arch }}{% endif %}/{{ tag }}/{{ tag }}-windows10{% if arch != "x86_64" %}-{{ arch }}{% endif %}.exe" class="cta-secondary">Download ({{ arch }})</a>
29+
{% endfor %}
30+
</ul>
2431
<a href="/install/windows/traditional" class="cta-secondary">Instructions</a>
2532
</li>
2633
<li class="resource">

0 commit comments

Comments
 (0)