Skip to content

Commit 462701b

Browse files
committed
Add copy button for Linux
1 parent 7fae307 commit 462701b

File tree

4 files changed

+63
-63
lines changed

4 files changed

+63
-63
lines changed

_includes/install/_linux_platforms_tabs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The Swiftly installer manages Swift and its dependencies. It supports switching between different versions and downloading updates.
77
</p>
88
<h4>Run this in a terminal:</h4>
9-
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl -O https://download.swift.org/swiftly/linux/swiftly-{{ site.data.builds.swiftly_release.version }}-$(uname -m).tar.gz &amp;&amp; \
9+
<div class="language-plaintext highlighter-rouge"><div class="highlight"><button>Copy</button><pre class="highlight"><code>curl -O https://download.swift.org/swiftly/linux/swiftly-{{ site.data.builds.swiftly_release.version }}-$(uname -m).tar.gz &amp;&amp; \
1010
tar zxf swiftly-{{ site.data.builds.swiftly_release.version }}-$(uname -m).tar.gz &amp;&amp; \
1111
./swiftly init --quiet-shell-followup &amp;&amp; \
1212
. ~/.local/share/swiftly/env.sh &amp;&amp; \

assets/stylesheets/elements/_grid.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ a.cta-secondary, [class^="language-"] button {
116116
div.highlight {
117117
position: relative;
118118

119-
&:hover [class^="language-"] button {
119+
&:hover button {
120120
display: block;
121121
}
122122
}

install/linux/swiftly/index.md

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,63 +3,65 @@ layout: page
33
title: Getting Started with Swiftly on Linux
44
---
55

6-
7-
If you are using Linux then you can download the archive:
6+
Download swiftly for [Linux (Intel)](https://download.swift.org/swiftly/linux/swiftly-{{ site.data.builds.swiftly_release.version }}-x86_64.tar.gz), or [Linux (ARM)](https://download.swift.org/swiftly/linux/swiftly-{{ site.data.builds.swiftly_release.version }}-aarch64.tar.gz).
87

98
```
109
curl -O https://download.swift.org/swiftly/linux/swiftly-{{ site.data.builds.swiftly_release.version }}-$(uname -m).tar.gz
1110
```
1211

13-
Extract the archive:
12+
You can verify the integrity of the archive using the PGP signature. This will download the signature, install the swift.org signatures into your keychain, and verify the signature.
13+
1414
```
15-
tar zxf swiftly-{{ site.data.builds.swiftly_release.version }}-$(uname -m).tar.gz
15+
curl https://www.swift.org/keys/all-keys.asc | gpg --import -
16+
curl -O https://download.swift.org/swiftly/linux/swiftly-{{ site.data.builds.swiftly_release.version }}-$(uname -m).tar.gz.sig
17+
gpg --verify swiftly-{{ site.data.builds.swiftly_release.version }}-$(uname -m).tar.gz.sig swiftly-{{ site.data.builds.swiftly_release.version }}-$(uname -m).tar.gz
1618
```
1719

18-
Now run swiftly init to finish the installation:
20+
Extract the archive.
1921

2022
```
21-
./swiftly init
23+
tar -zxf swiftly-{{ site.data.builds.swiftly_release.version }}-$(uname -m).tar.gz
2224
```
23-
Swiftly will install itself and download the latest available Swift toolchain. Follow the prompts for any additional steps. Once everything is done you can begin using swift.
24-
25-
```
26-
$ swift --version
27-
28-
29-
Swift version 6.0.3 (swift-6.0.3-RELEASE)
30-
...
3125

26+
Run the following command in your terminal, to configure swiftly for your account, and automatically download the latest swift toolchain.
3227

33-
$ swift build # Build with the latest (6.0.3) toolchain
3428
```
35-
36-
You can install (and use) another release toolchain:
37-
29+
./swiftly init
3830
```
39-
$ swiftly install --use 5.10
4031

32+
Your current shell may need some additional steps to update your session. Follow the guidance at the end of the installation for a smooth install experience, such as sourcing the environment file, and rehashing your shell's PATH.
4133

42-
$ swift --version
34+
There can be certain packages that need to be installed on your system so that the Swift toolchain can function. The swiftly initialization routine will show you how to install any missing packages.
4335

36+
Now that swiftly and swift are installed, you can access the `swift` command from the latest Swift release:
4437

45-
Swift version 5.10.1 (swift-5.10.1-RELEASE)
46-
...
38+
```
39+
swift --version
40+
--
41+
Swift version {{ site.data.builds.swift_releases.last.name }} (swift-{{ site.data.builds.swift_releases.last.name }}-RELEASE)
42+
Target: x86_64-unknown-linux-gnu
43+
```
4744

45+
Or, you can install (and use) another swift release:
4846

49-
$ swift build # Build with the 5.10.1 toolchain
5047
```
48+
swiftly install --use 5.10
49+
swift --version
50+
--
51+
Swift version 5.10 (swift-5.10-RELEASE)
52+
Target: x86_64-unknown-linux-gnu
53+
```
54+
55+
There's also an option to install the latest snapshot release and get access to the latest features:
5156

52-
Quickly test your package with the latest nightly snapshot to prepare for the next release:
5357
```
54-
$ swiftly install main-snapshot
55-
$ swiftly run swift test +main-snapshot # Run "swift test" with the main-snapshot toolchain
56-
$ swift build # Continue to build with my usual toolchain
58+
swiftly install --use main-snapshot
5759
```
5860

59-
Uninstall this toolchain after you’re finished with it:
61+
Check for updates to swiftly and install them by running the self-update command:
6062

6163
```
62-
$ swiftly uninstall main-snapshot
64+
swiftly self-update
6365
```
6466

65-
[Learn more about Swiftly](https://www.swift.org/swiftly/documentation/swiftlydocs)
67+
You can discover more about swiftly in the [documentation](https://www.swift.org/swiftly/documentation/swiftlydocs/)

install/macos/swiftly/index.md

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,57 +3,55 @@ layout: page
33
title: Getting Started with Swiftly on macOS
44
---
55

6-
On macOS you can run download the pkg:
7-
```
8-
curl -O https://download.swift.org/swiftly/darwin/swiftly-{{ site.data.builds.swiftly_release.version }}.pkg
9-
```
6+
Download the [swiftly package for macOS](https://download.swift.org/swiftly/darwin/swiftly-{{ site.data.builds.swiftly_release.version }}.pkg).
7+
8+
Install the package in your user account:
109

11-
Run the pkg installer from the command-line like this:
1210
```
1311
installer -pkg swiftly-{{ site.data.builds.swiftly_release.version }}.pkg -target CurrentUserHomeDirectory
1412
```
1513

16-
Now run swiftly init to finish the installation:
17-
```
18-
/usr/local/bin/swiftly init
14+
Run the following command in your terminal, to configure swiftly for your account, and automatically download the latest swift toolchain.
15+
1916
```
20-
Swiftly will install itself and download the latest available Swift toolchain. Follow the prompts for any additional steps. Once everything is done you can begin using swift.
17+
~/usr/local/bin/swiftly init
2118
```
22-
$ swift --version
2319

20+
<div class="warning" markdown="1">
21+
Depending on how you installed the package the swiftly binary can be in your home directory. You can run in from there like this: `~/swiftly init`
2422

25-
Swift version 6.0.3 (swift-6.0.3-RELEASE)
26-
...
23+
Your current shell may need some additional steps to update your session. Follow the guidance at the end of the installation for a smooth install experience, such as sourcing the environment file, and rehashing your shell's PATH.
24+
</div>
2725

26+
Now that swiftly and swift are installed, you can access the `swift` command from the latest Swift release:
2827

29-
$ swift build # Build with the latest (6.0.3) toolchain
3028
```
31-
32-
You can install (and use) another release toolchain:
29+
swift --version
30+
--
31+
Apple Swift version {{ site.data.builds.swift_releases.last.name }} (swift-{{ site.data.builds.swift_releases.last.name }}-RELEASE)
32+
Target: arm64-apple-macosx15.0
3333
```
34-
$ swiftly install --use 5.10
35-
3634

37-
$ swift --version
35+
Or, you can install (and use) another swift release:
3836

39-
40-
Swift version 5.10.1 (swift-5.10.1-RELEASE)
41-
...
42-
43-
44-
$ swift build # Build with the 5.10.1 toolchain
4537
```
38+
swiftly install --use 5.10
39+
swift --version
40+
--
41+
Apple Swift version 5.10 (swift-5.10-RELEASE)
42+
Target: arm64-apple-macosx15.0
43+
```
44+
45+
There's also an option to install the latest snapshot release and get access to the latest features:
4646

47-
Quickly test your package with the latest nightly snapshot to prepare for the next release:
4847
```
49-
$ swiftly install main-snapshot
50-
$ swiftly run swift test +main-snapshot # Run "swift test" with the main-snapshot toolchain
51-
$ swift build # Continue to build with my usual toolchain
48+
swiftly install --use main-snapshot
5249
```
5350

54-
Uninstall this toolchain after you’re finished with it:
51+
Check for updates to swiftly and install them by running the self-update command:
52+
5553
```
56-
$ swiftly uninstall main-snapshot
54+
swiftly self-update
5755
```
5856

59-
[Learn more about Swiftly](https://www.swift.org/swiftly/documentation/swiftlydocs)
57+
You can discover more about swiftly in the [documentation](https://www.swift.org/swiftly/documentation/swiftlydocs/)

0 commit comments

Comments
 (0)