feat: extend installation instruction to get the latest release binaries

This commit is contained in:
Eugen Eisler 2024-09-27 11:36:05 +02:00
parent fa457e7812
commit c5db39a06d
3 changed files with 25 additions and 3 deletions

View File

@ -113,6 +113,29 @@ Fabric has Patterns for all sorts of life and work activities, including:
## Installation ## 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. To install Fabric, [make sure Go is installed](https://go.dev/doc/install), and then run the following command.
```bash ```bash

View File

@ -15,8 +15,6 @@ import (
func Cli(version string) (message string, err error) { func Cli(version string) (message string, err error) {
var currentFlags *Flags var currentFlags *Flags
if currentFlags, err = Init(); err != nil { if currentFlags, err = Init(); err != nil {
// we need to reset error, because we don't want to show double help messages
err = nil
return return
} }

View File

@ -2,6 +2,7 @@ package main
import ( import (
"fmt" "fmt"
"github.com/jessevdk/go-flags"
"os" "os"
"github.com/danielmiessler/fabric/cli" "github.com/danielmiessler/fabric/cli"
@ -12,7 +13,7 @@ var version = "dev" // Default version
func main() { func main() {
_, err := cli.Cli(version) _, err := cli.Cli(version)
if err != nil { if err != nil && !flags.WroteHelp(err) {
fmt.Printf("%s\n", err) fmt.Printf("%s\n", err)
os.Exit(1) os.Exit(1)
} }