Skip to content

Commit 0bd48ce

Browse files
author
Vic Shóstak
authored
Merge pull request #57 from create-go-app/dev
Update installation instructions
2 parents 0a29c11 + 2821482 commit 0bd48ce

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ First of all, [download](https://golang.org/dl/) and install **Go**. Version `1.
1313
Next, download the **latest** version of the Create Go App CLI to your system:
1414

1515
```bash
16-
go get github.com/create-go-app/cli
16+
go get -u github.com/create-go-app/cli
1717
```
1818

19-
Installation is done by using the [`go build`](https://golang.org/cmd/go/#hdr-Compile_packages_and_dependencies) command with `$GOPATH/bin`:
19+
Installation is done by using the [`go install`](https://golang.org/cmd/go/#hdr-Compile_and_install_packages_and_dependencies) command and rename installed binary in `$GOPATH/bin`:
2020

2121
```bash
22-
go build -ldflags="-s -w" -o $GOPATH/bin/cgapp github.com/create-go-app/cli
22+
go install -ldflags="-s -w" github.com/create-go-app/cli && mv $GOPATH/bin/cli $GOPATH/bin/cgapp
2323
```
2424

2525
Let's create a new project via **interactive console UI** (or **CUI** for short) into current folder:
@@ -286,6 +286,21 @@ project:
286286

287287
> ☝️ The `https://` protocol will be added automatically!
288288

289+
## 👵 How to install older version?
290+
291+
You can do it by using a version suffix in `go install` command:
292+
293+
```bash
294+
# With an indication of the exact versions:
295+
go install github.com/create-go-app/[email protected]
296+
```
297+
298+
> ☝️ Don't forget to rename binary after installation, according to the version you have installed! This must be done to avoid confusion with the latest version.
299+
>
300+
> For example: `mv $GOPATH/bin/cli $GOPATH/bin/cgapp_v1_6_0` and run it by `cgapp_v1_6_0`.
301+
302+
Found all available CLI versions on our [pkg.go.dev page](https://pkg.go.dev/github.com/create-go-app/cli?tab=versions).
303+
289304
## ⭐️ Project assistance
290305

291306
If you want to say **thank you** or/and support active development of `Create Go App CLI`:

0 commit comments

Comments
 (0)