Skip to content

Commit 56f4990

Browse files
committed
Reorganise upgrade documentation
Signed-off-by: itowlson <[email protected]>
1 parent 29c50af commit 56f4990

File tree

1 file changed

+27
-69
lines changed

1 file changed

+27
-69
lines changed

content/v3/upgrade.md

Lines changed: 27 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ url = "https://github.com/spinframework/spin-docs/blob/main/content/v3/upgrade.m
77

88
---
99
- [Are You on the Latest Version?](#are-you-on-the-latest-version)
10-
- [Upgrade Spin](#upgrade-spin)
11-
- [Installer](#installer)
12-
- [Homebrew](#homebrew)
13-
- [Cargo](#cargo)
14-
- [Source](#source)
10+
- [Upgrading Using the Installer](#upgrading-using-the-installer)
11+
- [Upgrading Using Homebrew](#upgrading-using-homebrew)
12+
- [Upgrading Using `cargo`](#upgrading-using-cargo)
13+
- [Upgrading by Building From Source](#upgrading-by-building-from-source)
14+
- [If You're Not Sure](#if-youre-not-sure)
1515
- [Troubleshooting](#troubleshooting)
1616
- [Not Seeing the Latest Version?](#not-seeing-the-latest-version)
1717

18+
Spin can be installed in many ways, and therefore the upgrade procedure can differ between users. Here are a few suggested ways to upgrade Spin to the latest version.
19+
1820
## Are You on the Latest Version?
1921

2022
The best way to know if you're on the latest version of Spin is to run `spin --version`:
@@ -29,59 +31,15 @@ You can compare the output from the above command with the [latest release relea
2931

3032
![spin version image](https://img.shields.io/github/v/release/fermyon/spin)
3133

32-
## Upgrade Spin
33-
34-
Spin can be installed in many ways, and therefore the upgrade procedure can differ between users. Here are a few suggested ways to upgrade Spin to the latest version. If you're not sure how or where you installed your current version of Spin try using the `which` command on [Linux and macOS](https://linux.die.net/man/1/which) and the `where` command on [Windows](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/where), as shown below:
35-
36-
{{ tabs "os" }}
37-
38-
{{ startTab "Linux"}}
39-
40-
<!-- @selectiveCpy -->
41-
42-
```bash
43-
$ which spin
44-
```
45-
46-
{{ blockEnd }}
47-
48-
{{ startTab "macOS"}}
49-
50-
<!-- @selectiveCpy -->
51-
52-
```bash
53-
$ which spin
54-
```
55-
56-
{{ blockEnd }}
57-
58-
{{ startTab "Windows"}}
59-
60-
<!-- @selectiveCpy -->
61-
62-
```bash
63-
$ where spin
64-
```
65-
66-
{{ blockEnd }}
67-
68-
{{ blockEnd }}
69-
70-
### Installer
34+
## Upgrading Using the Installer
7135

7236
If you originally followed the documentation's [installer script method](./install#installing-spin), please revisit to reinstall.
7337

74-
> Hint: Your Spin executable will likely be in the following location:
75-
76-
<!-- @nocpy -->
38+
> The installer downloads to the current directory, which is probably not where you're running it from day-to-day. After downloading, move the downloaded Spin binary to the same place as you moved it before, for example `/usr/local/bin/spin`. You can use `which spin` (Linux and MacOS) or `where spin` (Windows) to remind yourself where that was!
7739
78-
```bash
79-
/usr/local/bin/spin
80-
```
40+
## Upgrading Using Homebrew
8141

82-
### Homebrew
83-
84-
If you installed Spin using [Homebrew](https://brew.sh/) please use the following commands to upgrade Spin.
42+
If you originally installed Spin via [Homebrew](https://brew.sh/), you should use Homebrew to upgrade it:
8543

8644
<!-- @selectiveCpy -->
8745

@@ -90,27 +48,27 @@ $ brew update
9048
$ brew upgrade fermyon/tap/spin
9149
```
9250

93-
### Cargo
94-
95-
If you originally followed the documentation's [Cargo install method](./install#using-cargo-to-install-spin), please revisit to reinstall.
96-
97-
> Hint: Your Spin executable will likely be in the following location:
51+
## Upgrading Using `cargo`
9852

99-
<!-- @nocpy -->
53+
If you originally [installed Spin via `cargo install`](./install#using-cargo-to-install-spin), please revisit to reinstall.
10054

101-
```bash
102-
~/.cargo/bin/spin
103-
```
104-
105-
### Source
55+
## Upgrading by Building From Source
10656

10757
If you followed the documentation's [install from source method](./install#building-spin-from-source) please revisit to reinstall.
10858

109-
> Hint: Your Spin executable will likely be in the following location (where you originally cloned the Spin repository):
59+
## If You're Not Sure
11060

111-
```bash
112-
~/spin/target/release/spin
113-
```
61+
If you can't remember how you originally installed Spin, run `which spin` (Linux or MacOS) or `where spin` (Windows) to see where your current install is, and look it up on the following chart:
62+
63+
| Current location is... | Install / upgrade method |
64+
|----------------------------------|--------------------------------------------|
65+
| `~/.cargo/bin/spin` | You used `cargo install`. Re-run the instructions for using Cargo. |
66+
| `C:/Users/.../.cargo/bin/spin` | You used `cargo install`. Re-run the instructions for using Cargo. |
67+
| `/opt/homebrew/Cellar/...` | You used Homebrew. [See above.](#homebrew) |
68+
| `/usr/local/Cellar/...` | You used Homebrew. [See above.](#homebrew) |
69+
| `/home/linuxbrew/.linuxbrew/...` | You used Homebrew. [See above.](#homebrew) |
70+
| `.../target/release/spin` | You built from source. Re-run the instructions for building from source. |
71+
| Anywhere else | You used the install script. Re-run it, then move the `spin` file to replace your current one. |
11472

11573
## Troubleshooting
11674

@@ -127,7 +85,7 @@ echo $PATH
12785
/Users/my_user/.cargo/bin:/usr/local/bin
12886
```
12987

130-
> Paths are separated by the `:` (colon)
88+
> Paths are separated by the `:` (colon) on Linux and MacOS, and `;` (semi-colon) on Windows.
13189
13290
In the above case, the [Cargo install method](./install#using-cargo-to-install-spin)'s installation will take precedence over the [installer script method](./install#installing-spin)'s installation.
13391

0 commit comments

Comments
 (0)