-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: đź“ť reference for updating the cli
- Loading branch information
Showing
1 changed file
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
--- | ||
title: Update CLI from source code | ||
slug: update-cli-from-source-code | ||
hide_title: true | ||
tags: | ||
- references | ||
- help | ||
- update | ||
- upgrade | ||
- fix | ||
--- | ||
|
||
<!-- | ||
The following import is intentional (see partial <CheckoutCommitWarning />) | ||
--> | ||
import Author from '@site/src/components/Author'; | ||
|
||
##Â Switch to the installation user | ||
|
||
Switch to the username you've used throughout the installation process. | ||
|
||
```sh | ||
su <USERNAME> | ||
``` | ||
|
||
For example, if you used the username `lgtn` it'll look like the following command: | ||
|
||
```sh | ||
su lgtn | ||
``` | ||
|
||
##Â Change directory to the source code | ||
|
||
If you have installed it via the recommended process or instructions, then the default location where the [source code](https://github.com/fleek-network/lightning) is stored is `~/fleek-network/lightning`. | ||
|
||
```sh | ||
cd ~/fleek-network/lightning | ||
``` | ||
|
||
:::tip | ||
Notice that we use `~`, which refers to `$HOME`. You must use the username used for the installation process. For example, on [Ubuntu](/docs/node/requirements#server) if you used the username `lgtn`, the pathname for `$HOME` is `/home/lgtn`. | ||
::: | ||
|
||
## Pull the latest changes | ||
|
||
To pull the latest changes use the `git pull` command, as follows: | ||
|
||
```sh | ||
git pull origin testnet-alpha-0 | ||
``` | ||
|
||
:::tip | ||
We are using the branch named `testnet-alpha-0`, which is specific to the early testnet launch. Change to the correct branch name according to needs. For example, in the future the mainnet version will go on branch name `main`. | ||
::: | ||
|
||
## Build binary from the source | ||
|
||
To build the binary from the source code, we execute the cargo build command: | ||
|
||
```sh | ||
cargo +stable build --release | ||
``` | ||
|
||
### Restart the service | ||
|
||
Once the cargo build process completes, you have to restart the service, as follows: | ||
|
||
```sh | ||
systemctl restart lightning | ||
``` | ||
|
||
:::tip | ||
If you have installed the Fleek Network lightning manually, the [installation instructions](/docs/node/install#systemd-service-setup) recommended setting up a systemd service for the Fleek Network process. If you haven't, you're advised to check the instructions provided. | ||
::: | ||
|
||
### Health checkup | ||
|
||
Do a quick health check by running: | ||
|
||
```sh | ||
curl -w "\p" localhost:4069/health | ||
``` | ||
|
||
If successful, you should get the response `OK`, as follows: | ||
|
||
```sh | ||
OK | ||
``` | ||
|
||
<Author | ||
name="Helder Oliveira" | ||
image="https://github.com/heldrida.png" | ||
title="Software Developer + DX" | ||
url="https://github.com/heldrida" | ||
/> |