Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use swiftly_release data for the download page #873

Open
wants to merge 9 commits into
base: swiftly-preview
Choose a base branch
from
21 changes: 21 additions & 0 deletions _includes/install/_linux_platforms_tabs.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## Toolchain Installer
<ul class="grid-level-0">
<li class="grid-level-1 featured">
<h3>Swiftly (beta)</h3>
<p class="description">
Command line tool for installing, managing, and switching between Swift.org toolchains.
</p>
<!-- <br>
<p>To install swiftly, run the following commands in your terminal.</p>
<pre><code>
SWIFTLY_FILENAME=swiftly-{{ site.data.builds.swiftly_releases.version }}-$(uname -m).tar.gz
curl -s -O "https://download.swift.org/swiftly/linux/$SWIFTLY_FILENAME" && tar zxf "$SWIFTLY_FILENAME" && ./swiftly init
</code></pre> -->
<h4>License: <a href="https://raw.githubusercontent.com/swiftlang/swiftly/refs/heads/main/LICENSE.txt">Apache-2.0</a> | PGP: <a href="https://download.swift.org/swiftly/linux/swiftly-{{ site.data.builds.swiftly_releases.version }}-x86_64.tar.gz.sig">Signature</a></h4>
<a href="https://download.swift.org/swiftly/linux/swiftly-{{ site.data.builds.swiftly_releases.version }}-x86_64.tar.gz" class="cta-secondary">Download</a>
<a href="/install/linux/swiftly" class="cta-secondary">Instructions</a>
</li>
</ul>

## Alternate installation options

<p id="platforms">Select Linux platform:</p>

<div class="interactive-tabs os">
Expand Down
1 change: 0 additions & 1 deletion install/linux/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ title: Install Swift
---

{% include install/_os_tabs.md linux="true" %}

{% include install/_linux_platforms_tabs.md %}
48 changes: 48 additions & 0 deletions install/linux/swiftly/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
layout: page
title: Getting Started with Swiftly
---

Download swiftly from the [install page](/install).

Run the following command in your terminal, to configure swiftly for your account:

```
$ swiftly init
```

Once swiftly is installed you can use it to install the latest available swift toolchain like this:

```
$ swiftly install latest

Fetching the latest stable Swift release...
Installing Swift 6.0.1
Downloaded 488.5 MiB of 488.5 MiB
Extracting toolchain...
Swift 6.0.1 installed successfully!

$ swift --version

Swift version 6.0.1 (swift-6.0.1-RELEASE)
Target: x86_64-unknown-linux-gnu
```

Or, you can install (and use) a swift release:

```
$ swiftly install --use 5.10

$ swift --version

Swift version 5.10 (swift-5.10-RELEASE)
Target: x86_64-unknown-linux-gnu
```

There's also an option to install the latest snapshot release and get access to the latest features:

```
$ swiftly install main-snapshot
```

> Note: This last example just installed the toolchain. You can run "swiftly use" to switch to it and other installed toolchahins when you're ready.
19 changes: 18 additions & 1 deletion install/macos/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,25 @@ title: Install Swift

{% include install/_os_tabs.md macos="true" %}

## Latest Release (Swift {{ site.data.builds.swift_releases.last.name }})
## Toolchain Installer
<ul class="grid-level-0">
<li class="grid-level-1 featured">
<h3>Swiftly (beta)</h3>
<p class="description">
Command line tool for installing, managing, and switching between Swift.org toolchains.
</p>
<!-- <br>
<p>To install swiftly, run the following command in your terminal.</p>
<pre><code>
SWIFTLY_FILENAME=swiftly-{{ site.data.builds.swiftly_releases.version }}.pkg
curl -O -s "https://download.swift.org/swiftly/darwin/$SWIFTLY_FILENAME" && installer -pkg "$SWIFTLY_FILENAME" -target CurrentUserHomeDirectory && ~/usr/local/bin/swiftly init
</code></pre> -->
<a href="https://download.swift.org/swiftly/darwin/swiftly-{{ site.data.builds.swiftly_releases.version }}.pkg" class="cta-secondary">Download</a>
<a href="/install/macos/swiftly" class="cta-secondary">Instructions</a>
</li>
</ul>

## Latest Release (Swift {{ site.data.builds.swift_releases.last.name }})
<ul class="grid-level-0 grid-layout-2-column">
<li class="grid-level-1">
<h3>Xcode</h3>
Expand Down
51 changes: 51 additions & 0 deletions install/macos/swiftly/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
layout: page
title: Getting Started with Swiftly
---

Download swiftly from the [install page](/install).

Run the following command in your terminal, to configure swiftly for your account:

```
$ swiftly init
```

Once swiftly is installed you can use it to install the latest available swift toolchain like this:

```
$ swiftly install latest

Fetching the latest stable Swift release...
Installing Swift 6.0.1
Downloaded 1355.3 MiB of 1355.3 MiB
Installing package in user home directory...
installer: Package name is Swift Open Source Xcode Toolchain
installer: Upgrading at base path /Users/swift
installer: The upgrade was successful.
Swift 6.0.1 installed successfully!

$ swift --version

Apple Swift version 6.0.1 (swift-6.0.1-RELEASE)
Target: arm64-apple-macosx15.0
```

Or, you can install (and use) a swift release:

```
$ swiftly install --use 5.10

$ swift --version

Apple Swift version 5.10 (swift-5.10-RELEASE)
Target: arm64-apple-macosx15.0
```

There's also an option to install the latest snapshot release and get access to the latest features:

```
$ swiftly install main-snapshot
```

> Note: This last example just installed the toolchain. You can run "swiftly use" to switch to it and other installed toolchahins when you're ready.