Skip to content

Commit 9ce4db8

Browse files
authored
Refactor "Download" page, clean up unused codes, and update Windows toolchain information (#429)
* Windows toolchain doesn't support REPL * Thank you Saleem... Now we have Apple-signed toolchains * Windows toolchain is built against Python 3.9 * Update table ID for Windows builds * Updates matching of Windows platform * Conditially add Windowsw toolchain provider notice * Remove unused templates * Cleans up unused build variables * Avoid magic release date in source * Add note for old releases * Improve wording for snapshots * Use more proper names for download table templates * Update download template arguments * Add "platform" metadata to `swift_releases.yml`
1 parent 6416dc1 commit 9ce4db8

17 files changed

+380
-462
lines changed

_data/builds/swift_releases.yml

Lines changed: 263 additions & 0 deletions
Large diffs are not rendered by default.

download/_build-arch.html

Lines changed: 0 additions & 43 deletions
This file was deleted.

download/_build-docker.html

Lines changed: 0 additions & 29 deletions
This file was deleted.

download/_build-platform.html renamed to download/_build-release.html

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,34 @@
1010
<tr>
1111
<td class="download">
1212
<span class="release">
13-
<a href="https://itunes.apple.com/app/xcode/id497799835" title="Download" download>{{ include.platform.xcode }}</a>
13+
<a href="https://itunes.apple.com/app/xcode/id497799835" title="Download" download>{{ include.release.xcode }}</a>
1414
</span>
1515
</td>
1616
<td class="arch-tag">
17-
{% if include.platform.xcode_toolchain != false %}
18-
<a href="https://download.swift.org/{{ include.platform.tag | downcase }}/xcode/{{ include.platform.tag }}/{{ include.platform.tag }}-osx.pkg" title="Download">Toolchain</a>
19-
<a href="https://download.swift.org/{{ include.platform.tag | downcase }}/xcode/{{ include.platform.tag }}/{{ include.platform.tag }}-osx-symbols.pkg" title="Debugging Symbols" class="signature">Debugging Symbols</a>
17+
{% if include.release.xcode_toolchain != false %}
18+
<a href="https://download.swift.org/{{ include.release.tag | downcase }}/xcode/{{ include.release.tag }}/{{ include.release.tag }}-osx.pkg" title="Download">Toolchain</a>
19+
<a href="https://download.swift.org/{{ include.release.tag | downcase }}/xcode/{{ include.release.tag }}/{{ include.release.tag }}-osx-symbols.pkg" title="Debugging Symbols" class="signature">Debugging Symbols</a>
2020
{% else %}
2121
<a href="https://itunes.apple.com/app/xcode/id497799835" title="Download" download>x86_64</a>
2222
{% endif %}
2323
</td>
2424
<td class="docker-tag">Unavailable</td>
2525
</tr>
26-
{% for platform in include.platform.platforms %}
26+
{% for platform in include.release.platforms %}
2727
<tr>
2828
<td class="download">
2929
<span class="release">
30-
<p title="Download" download>{{ platform.name }}</p>
31-
{% if platform.name == "Windows 10" %}
32-
{% assign package_extension = 'exe' %}
33-
{% else %}
34-
{% assign package_extension = 'tar.gz' %}
35-
{% endif %}
30+
<p title="Download" download>
31+
{{ platform.name }}
32+
{% if platform.platform == "Windows" and include.release.date < swift_5_9_1_release_build.date %}
33+
<sup> 1</sup>
34+
{% endif %}
35+
</p>
36+
{% if platform.platform == "Windows" %}
37+
{% assign package_extension = 'exe' %}
38+
{% else %}
39+
{% assign package_extension = 'tar.gz' %}
40+
{% endif %}
3641
</span>
3742
</td>
3843
<td class="arch-tag">
@@ -48,11 +53,11 @@
4853
{% assign platform_name_url = platform_name_url | append: "-" | append: arch %}
4954
{% assign platform_name = platform_name | append: "-" | append: arch %}
5055
{% endif %}
51-
{% assign tag_downcase = include.platform.tag | downcase %}
52-
<a href="https://download.swift.org/{{ tag_downcase }}/{{ platform_name_url }}/{{ include.platform.tag}}/{{ include.platform.tag}}-{{ platform_name }}.{{ package_extension }}">{{ arch }}</a>
53-
{% if platform.name != "Windows 10" %}
54-
<a href="https://download.swift.org/{{ tag_downcase }}/{{ platform_name_url }}/{{ include.platform.tag}}/{{ include.platform.tag}}-{{ platform_name }}.{{ package_extension }}.sig" title="PGP Signature" class="signature">Signature ({{ arch }})</a>
55-
{% endif %}
56+
{% assign tag_downcase = include.release.tag | downcase %}
57+
<a href="https://download.swift.org/{{ tag_downcase }}/{{ platform_name_url }}/{{ include.release.tag}}/{{ include.release.tag}}-{{ platform_name }}.{{ package_extension }}">{{ arch }}</a>
58+
{% unless platform.platform == "Windows" and include.release.date >= swift_5_9_1_release_build.date %}
59+
<a href="https://download.swift.org/{{ tag_downcase }}/{{ platform_name_url }}/{{ include.release.tag}}/{{ include.release.tag}}-{{ platform_name }}.{{ package_extension }}.sig" title="PGP Signature" class="signature">Signature ({{ arch }})</a>
60+
{% endunless %}
5661
{% endfor %}
5762
</td>
5863
<td class="docker-tag">
@@ -66,3 +71,8 @@
6671
{% endfor %}
6772
</tbody>
6873
</table>
74+
75+
{% assign windows_platform = include.release.platforms | where: 'platform', 'Windows' %}
76+
{% if windows_platform.size > 0 and include.release.date < swift_5_9_1_release_build.date %}
77+
<sup>1</sup> Swift {{ include.release.name }} {{ windows_platform.first.name }} toolchain is provided by <a href="https://github.com/compnerd">Saleem Abdulrasool</a>. Saleem is the platform champion for the Windows port of Swift and this is an official build from the Swift project. <br><br>
78+
{% endif %}

download/_build-snapshot.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<tr>
2+
<td class="download">
3+
<span class="release">
4+
<p title="Download" download>
5+
{{ include.name }}
6+
{% assign build_date_string = include.build.date | date: '%Y-%m-%d' %}
7+
{% if include.platform == "Windows" and build_date_string < swift_5_9_1_release_date_string %}
8+
<sup> 1</sup>
9+
{% endif %}
10+
</p>
11+
</span>
12+
</td>
13+
<td class="date">
14+
<time datetime="{{ include.build.date | date_to_xmlschema }}" title="{{ include.build.date | date: '%B %-d, %Y %l:%M %p (%Z)' }}">{{ include.build.date | date: '%B %-d, %Y' }}</time>
15+
</td>
16+
{% if include.arch %}
17+
<td class="arch-tag">
18+
<a href="https://download.swift.org/{{ include.branch_dir }}/{{ include.platform_dir }}/{{ include.build.dir }}/{{ include.build.download }}">{{ include.arch }}</a>
19+
{% if include.build.download_signature %}
20+
<a href="https://download.swift.org/{{ include.branch_dir }}/{{ include.platform_dir }}/{{ include.build.dir }}/{{ include.build.download_signature }}" title="PGP Signature" class="signature">Signature ({{ include.arch }})</a>
21+
{% endif %}
22+
{% if include.build.debug_info %}
23+
<a href="https://download.swift.org/{{ include.branch_dir }}/{{ include.platform_dir }}/{{ include.build.dir }}/{{ include.build.debug_info }}" title="Debugging Symbols" class="debug">Debugging Symbols</a>
24+
{% endif %}
25+
{% if include.arch_2 %}
26+
<a href="https://download.swift.org/{{ include.branch_dir }}/{{ include.platform_dir_2 }}/{{ include.build_2.dir }}/{{ include.build_2.download }}">{{ include.arch_2 }}</a>
27+
{% if include.build_2.download_signature %}
28+
<a href="https://download.swift.org/{{ include.branch_dir }}/{{ include.platform_dir_2 }}/{{ include.build_2.dir }}/{{ include.build_2.download_signature }}" title="PGP Signature" class="signature">Signature ({{ include.arch_2 }})</a>
29+
{% endif %}
30+
{% if include.build_2.debug_info %}
31+
<a href="https://download.swift.org/{{ include.branch_dir }}/{{ include.platform_dir_2 }}/{{ include.build_2.dir }}/{{ include.build2.debug_info }}" title="Debugging Symbols" class="debug">Debugging Symbols</a>
32+
{% endif %}
33+
{% endif %}
34+
</td>
35+
{% endif %}
36+
<td class="docker-tag">
37+
{% if include.docker_tag %}
38+
<a href="https://hub.docker.com/r/swiftlang/swift/tags">{{ include.docker_tag }}</a>
39+
{% else %}
40+
Unavailable
41+
{% endif %}
42+
</td>
43+
</tr>

download/_build.html

Lines changed: 0 additions & 19 deletions
This file was deleted.

download/_old-snapshot.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<a href="https://download.swift.org/{{ include.branch_dir }}/{{ include.platform_dir }}/{{ include.build.dir }}/{{ include.build.download_signature }}" title="PGP Signature" class="signature">Signature</a>
77
{% endif %}
88
{% if include.build.debug_info %}
9-
<a href="https://download.swift.org/{{ include.branch_dir }}/{{ include.platform_dir }}/{{ include.build.dir }}/{{ include.build.debug_info }}" title="Debugging Symbols" class="debug">Debugging Symbols</a>
9+
<a href="https://download.swift.org/{{ include.branch_dir }}/{{ include.platform_dir }}/{{ include.build.dir }}/{{ include.build.debug_info }}" title="Debugging Symbols" class="debug">Debugging Symbols</a>
1010
{% if include.build.debug_info_signature %}
1111
<a href="https://download.swift.org/{{ include.branch_dir }}/{{ include.platform_dir }}/{{ include.build.dir }}/{{ include.build.debug_info_signature }}" title="PGP Signature for Debugging Symbols">Signature</a>
1212
{% endif %}

download/_older-3_0-preview-1-snapshots.md

Lines changed: 0 additions & 58 deletions
This file was deleted.

download/_older-5_10-snapshots.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Amazon Linux 2
116116
117117
Windows 10
118118
119-
<table id="linux-builds" class="downloads">
119+
<table id="windows-builds" class="downloads">
120120
<thead>
121121
<tr>
122122
<th class="download">Download</th>

0 commit comments

Comments
 (0)