From be7d6adfc0113235b44a1cedd180550de96cf7d8 Mon Sep 17 00:00:00 2001 From: Patrick Hamann Date: Tue, 28 Apr 2020 11:49:28 +0100 Subject: [PATCH] Generate dep and rpm packages during release process. (#44) --- .goreleaser.yml | 8 ++++++++ README.md | 43 +++++++++++++++++++++++++++++++++++++++---- 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index c79d52956..3149aeda3 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -60,6 +60,14 @@ brews: test: | help_text = shell_output("#{bin}/fastly --help") assert_includes help_text, "Usage:" +nfpms: + - license: Apache 2.0 + maintainer: Fastly + homepage: https://github.com/fastly/cli + bindir: /usr/local + formats: + - deb + - rpm checksum: name_template: "{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS" snapshot: diff --git a/README.md b/README.md index 3ca700ea6..19575c2f1 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,49 @@ A CLI for interacting with the Fastly platform. -## Install +## Quick links +- [Installation](#Installation) +- [Usage](#Usage) +- [Development](#Development) +- [Issues](#Issues) -### Homebrew +## Installation + +### macOS +#### Homebrew Install: `brew install fastly/tap/fastly` Upgrade: `brew upgrade fastly` +### Debian/Ubuntu Linux + +Install and upgrade: + +1. Download the `.deb` file from the [releases page][releases] +2. `sudo apt install ./fastly_*_linux_amd64.deb` install the downloaded file + +### Fedora Linux + +Install and upgrade: + +1. Download the `.rpm` file from the [releases page][releases] +2. `sudo dnf install fastly_*_linux_amd64.rpm` install the downloaded file + +### Centos Linux + +Install and upgrade: + +1. Download the `.rpm` file from the [releases page][releases] +2. `sudo yum localinstall fastly_*_linux_amd64.rpm` install the downloaded file + +### openSUSE/SUSE Linux + +Install and upgrade: + +1. Download the `.rpm` file from the [releases page][releases] +2. `sudo zypper in fastly_*_linux_amd64.rpm` install the downloaded file + ### From a prebuilt binary [Download the latest release][latest] from the [releases page][releases]. Unarchive the binary and place it in your $PATH. You can verify the integrity @@ -30,7 +65,7 @@ Built with go version go1.13.1 linux/amd64 The Fastly CLI will notify you if a new version is available, and can update itself via `fastly update`. -## Use +## Usage The Fastly CLI interacts with [the Fastly API][api] via an [API token][tokens]. You'll need to [create an API token][create] for yourself, and then provide it @@ -49,7 +84,7 @@ Succinct help about any command or subcommand is available via the `-h, --help` flag. Verbose help about any command or subcommand is available via the help argument, e.g. `fastly help service`. -## Developing +## Development The Fastly CLI requires [Go 1.13 or above](https://golang.org). Clone this repo to any path and type `make` to run all of the tests and generate a development