feat: extend installation instruction to get the latest release binaries
This commit is contained in:
parent
fa457e7812
commit
c5db39a06d
23
README.md
23
README.md
@ -113,6 +113,29 @@ Fabric has Patterns for all sorts of life and work activities, including:
|
||||
|
||||
## Installation
|
||||
|
||||
To install Fabric, you can use the latest release binaries or install it from the source.
|
||||
|
||||
### Get Latest Release Binaries
|
||||
|
||||
```bash
|
||||
# Windows:
|
||||
curl -L https://github.com/danielmiessler/fabric/releases/latest/download/fabric-windows-amd64.exe > fabric.exe && fabric.exe --version
|
||||
|
||||
# MacOS (arm64):
|
||||
curl -L https://github.com/danielmiessler/fabric/releases/latest/download/fabric-darwin-arm64 > fabric && chmod +x fabric && ./fabric --version
|
||||
|
||||
# MacOS (amd64):
|
||||
curl -L https://github.com/danielmiessler/fabric/releases/latest/download/fabric-darwin-amd64 > fabric && chmod +x fabric && ./fabric --version
|
||||
|
||||
# Linux (amd64):
|
||||
curl -L https://github.com/danielmiessler/fabric/releases/latest/download/fabric-linux-amd64 > fabric && chmod +x fabric && ./fabric --version
|
||||
|
||||
# Linux (arm64):
|
||||
curl -L https://github.com/danielmiessler/fabric/releases/latest/download/fabric-linux-arm64 > fabric && chmod +x fabric && ./fabric --version
|
||||
```
|
||||
|
||||
### From Source
|
||||
|
||||
To install Fabric, [make sure Go is installed](https://go.dev/doc/install), and then run the following command.
|
||||
|
||||
```bash
|
||||
|
@ -15,8 +15,6 @@ import (
|
||||
func Cli(version string) (message string, err error) {
|
||||
var currentFlags *Flags
|
||||
if currentFlags, err = Init(); err != nil {
|
||||
// we need to reset error, because we don't want to show double help messages
|
||||
err = nil
|
||||
return
|
||||
}
|
||||
|
||||
|
3
main.go
3
main.go
@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/jessevdk/go-flags"
|
||||
"os"
|
||||
|
||||
"github.com/danielmiessler/fabric/cli"
|
||||
@ -12,7 +13,7 @@ var version = "dev" // Default version
|
||||
|
||||
func main() {
|
||||
_, err := cli.Cli(version)
|
||||
if err != nil {
|
||||
if err != nil && !flags.WroteHelp(err) {
|
||||
fmt.Printf("%s\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user