Skip to content

Commit

Permalink
feat: use a version data for go and lotus
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentsenta committed Jul 9, 2024
1 parent 7fbadd0 commit ad3f2ea
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion content/en/lotus/developers/local-network.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Filecoin local networks use slightly different binaries than those used in the F
```
{{< alert >}}
Checking out `releases` will always check out the latest stable release. If you need a specific release, specify a specific `<tag_or_release>`. For example: `git checkout v1.26.3`.
Checking out `releases` will always check out the latest stable release. If you need a specific release, specify a specific `<tag_or_release>`. For example: `git checkout v{{< version >}}`.
{{< /alert >}}
1. Remove any existing repositories.
Expand Down
15 changes: 7 additions & 8 deletions content/en/lotus/install/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,22 @@ Amazon Linux 2:
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm; sudo yum install -y hwloc-devel
```


1. Download the latest Linux bundle from the [Lotus GitHub releases page](https://github.com/filecoin-project/lotus/releases/latest):

```shell
wget https://github.com/filecoin-project/lotus/releases/download/v1.26.3/lotus_v1.26.3_linux_amd64.tar.gz
wget https://github.com/filecoin-project/lotus/releases/download/v{{< version >}}/lotus_v{{< version >}}_linux_amd64.tar.gz
```

1. Extract tar -xvf archive.tar.gz executable:
2. Extract tar -xvf archive.tar.gz executable:

```shell
tar -xvf lotus_v1.26.3_linux_amd64.tar.gz
tar -xvf lotus_v{{< version >}}_linux_amd64.tar.gz
```

1. Move the `lotus` binary to `/usr/local/bin`:
3. Move the `lotus` binary to `/usr/local/bin`:

```shell
sudo mv lotus_1.26.0_linux_amd64/lotus /usr/local/bin/lotus
sudo mv lotus_{{< version >}}_linux_amd64/lotus /usr/local/bin/lotus
```

## Building from source
Expand Down Expand Up @@ -126,10 +125,10 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

### Go

To build Lotus, you need a working installation of [Go 1.21.7 or higher](https://golang.org/dl/):
To build Lotus, you need a working installation of [Go {{< version "go" >}} or higher](https://golang.org/dl/):

```shell
wget -c https://golang.org/dl/go1.21.7.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local
wget -c https://golang.org/dl/go{{< version "go" >}}.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local
```

{{< alert icon="tip">}}
Expand Down
2 changes: 1 addition & 1 deletion content/en/tutorials/lotus-miner/supra-seal-pc2.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Please note that the `FFI_USE_FIXED_ROWS_TO_DISCARD=1` environment variable must
sudo apt install build-essential libconfig++-dev libgmp-dev wget git curl
```

2. Checkout [Lotus v1.26.3](https://github.com/filecoin-project/lotus/releases/tag/v1.26.3).
2. Checkout [Lotus v{{< version >}}](https://github.com/filecoin-project/lotus/releases/tag/v{{< version >}}).
3. [Build from source]({{< relref "../../lotus/install/linux/#native-filecoin-ffi" >}}) with the environment variable `FFI_USE_FIXED_ROWS_TO_DISCARD=1` exported.

**Please note that you also need to export and build with this enviroment variable across the lotus-miner stack of machines. Else the SupraSeal PC2 will fail!**
Expand Down
6 changes: 3 additions & 3 deletions content/en/tutorials/lotus/store-and-retrieve/set-up.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,19 @@ sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.
1. Download the latest Linux bundle from the [Lotus GitHub releases page](https://github.com/filecoin-project/lotus/releases/latest):

```shell
wget https://github.com/filecoin-project/lotus/releases/download/v1.26.3/lotus_v1.26.3_linux_amd64.tar.gz
wget https://github.com/filecoin-project/lotus/releases/download/v{{< version >}}/lotus_v{{< version >}}_linux_amd64.tar.gz
```

1. Extract tar -xvf archive.tar.gz executable:

```shell
tar -xvf lotus_1.26.0_linux_amd64.tar.gz
tar -xvf lotus_{{< version >}}_linux_amd64.tar.gz
```

1. Move the `lotus` binary to `/usr/local/bin`:

```shell
sudo mv lotus_1.26.0_linux_amd64/lotus /usr/local/bin/lotus
sudo mv lotus_{{< version >}}_linux_amd64/lotus /usr/local/bin/lotus
```

[Head onto the next section to run your Lotus lite-node ↓](#run-a-lotus-lite-node)
Expand Down
4 changes: 4 additions & 0 deletions data/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"lotus": "1.27.1",
"go": "1.21.7"
}
3 changes: 3 additions & 0 deletions layouts/shortcodes/version.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{ $param := .Get 0 | default "lotus" -}}
{{- $version := index .Site.Data.version $param -}}
{{- $version -}}

0 comments on commit ad3f2ea

Please sign in to comment.