Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Changelog

## [Unreleased](https://github.com/lets-cli/lets/releases/tag/v0.0.X)

* `[Changed]` Install script now installs to `$HOME/.lets/bin`, exposes `lets` through a user PATH symlink, and stops on old non-Homebrew `/usr/local/bin/lets` installs. Issue [#121](https://github.com/lets-cli/lets/issues/121)
* `[Fixed]` Prevent `lets self upgrade` from overwriting Homebrew-managed installs. Issue [#338](https://github.com/lets-cli/lets/issues/338)

## [0.0.60](https://github.com/lets-cli/lets/releases/tag/v0.0.60)
Expand Down
11 changes: 6 additions & 5 deletions docs/docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,26 @@ have stable `lets` version untouched.
To build a binary:

```bash
go build -o lets-dev *.go
go build -o lets-dev ./cmd/lets
```

To install in system
To install in your user `PATH`:

```bash
go build -o lets-dev *.go && sudo mv ./lets-dev /usr/local/bin/lets-dev
mkdir -p "$HOME/.local/bin"
go build -o "$HOME/.local/bin/lets-dev" ./cmd/lets
```

Or if you already have `lets` installed in your system:

```bash
lets build-and-install [--path=<path>]
```
`path` - your custom executable $PATH, defaults to `/usr/local/bin`
`path` - your custom executable $PATH, defaults to `$HOME/.local/bin`

After install - check version of lets - `lets-dev --version` - it should be development

It will install `lets-dev` to /usr/local/bin/lets-dev, or wherever you`ve specified in path, and set version to development with current tag and timestamp
It will install `lets-dev` to `$HOME/.local/bin/lets-dev`, or wherever you`ve specified in path, and set version to development with current tag and timestamp

## Test

Expand Down
36 changes: 17 additions & 19 deletions docs/docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,37 @@ import TabItem from '@theme/TabItem';
<TabItem value="shell">

```bash
curl --proto '=https' --tlsv1.2 -sSf https://lets-cli.org/install.sh | sh -s -- -b ~/bin
curl -fsSL https://lets-cli.org/install.sh | bash
```

This will install **latest** `lets` binary to `~/bin` directory.
This installs the **latest** `lets` binary to `$HOME/.lets/bin/lets`.

To be able to run `lets` from any place in system add `$HOME/bin` to your `PATH`
The installer will make `lets` available in your `PATH` by creating a symlink in the first existing preferred
directory from this list:

Open one of these files
* `$HOME/.local/bin`
* `$HOME/bin`
* `$HOME/.bin`

```bash
vim ~/.profile # or vim ~/.bashrc or ~/.zshrc
```
If none of these directories are in `PATH`, the installer creates `$HOME/.local/bin`, links `lets` there, and adds
`$HOME/.local/bin` to your shell profile.

Add the following line at the end of file, save file and restart the shell.
To install a specific version of `lets` (for example `v0.0.21`):

```bash
export PATH=$PATH:$HOME/bin
curl -fsSL https://lets-cli.org/install.sh | bash -s -- v0.0.21
```

You can change install location to any directory you want, probably to directory that is in your $PATH

To install a specific version of `lets` (for example `v0.0.21`):
You can also use `LETS_VERSION`. If both `LETS_VERSION` and a positional version are provided, `LETS_VERSION` wins.

```bash
curl --proto '=https' --tlsv1.2 -sSf https://lets-cli.org/install.sh | sh -s -- v0.0.21
curl -fsSL https://lets-cli.org/install.sh | LETS_VERSION=v0.0.21 bash
```

To use `lets` globally in system you may want to install `lets` to `/usr/local/bin`

> May require `sudo`
To install into a custom lets home directory, set `LETS_HOME`. The binary will be installed to `$LETS_HOME/bin/lets`.

```bash
curl --proto '=https' --tlsv1.2 -sSf https://lets-cli.org/install.sh | sh -s -- -b /usr/local/bin
curl -fsSL https://lets-cli.org/install.sh | LETS_HOME=$HOME/tools/lets bash
```

</TabItem>
Expand All @@ -62,7 +60,7 @@ Download the version you need for your platform from [Lets Releases](https://git

Once downloaded, the binary can be run from anywhere.

Ideally, you should install it somewhere in your PATH for easy use. `/usr/local/bin` is the most probable location.
Ideally, install it somewhere in your user `PATH`, such as `$HOME/.local/bin`.

</TabItem>
</Tabs>
Expand Down Expand Up @@ -143,7 +141,7 @@ If your `lets` version is below `0.0.30` - use shell script and specify the late
To update `lets` you can use shell script

```
curl --proto '=https' --tlsv1.2 -sSf https://lets-cli.org/install.sh | sh -s -- -b $(dirname $(which lets))
curl -fsSL https://lets-cli.org/install.sh | bash
```

Running script will update `lets` to **latest** version.
Expand Down
Loading
Loading