Skip to content

Commit

Permalink
Prepare for release (#2)
Browse files Browse the repository at this point in the history
* README.md: add installation and usage instructions

* Publish artifacts to a corresponding GitHub release

* Create releases with GoReleaser

* CI: use only_if check and goreleaser:latest image

* README.md: clarify WIP status
  • Loading branch information
edigaryev committed Jul 14, 2020
1 parent ae9641b commit 5c1bec2
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ task:
script: go test -v ./...

task:
name: Build
depends_on:
- Lint
- Test
script: go build -v ./...
name: Release
only_if: $CIRRUS_TAG != ''
container:
image: goreleaser/goreleaser:latest
release_script: gorelease
17 changes: 17 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
project_name: cirrus

before:
hooks:
- go mod download

builds:
- main: cmd/cirrus/main.go
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64

archives:
- format: zip
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
# cirrus-cli
CLI for executing Cirrus tasks locally
# Cirrus CLI

WIP CLI for executing Cirrus tasks locally. Currently can only validate Cirrus CI configuration file.

## Installation

### Releases

Check the [releases page](https://github.com/cirruslabs/cirrus-cli/releases) for a pre-built `cirrus` binary for your platform.

### Go

If you have Go 1.14 installed, you can run:

```
go install github.com/cirruslabs/cirrus-cli/...
```

This will build and place the `cirrus` binary in `$GOPATH/bin`.

To be able to run `cirrus` command from anywhere, make sure that the `$GOPATH/bin` directory is added to your `PATH` environment variable (see [article in the Go wiki](https://github.com/golang/go/wiki/SettingGOPATH) for more details).

## Usage

To validate a Cirrus CI configuration, simply switch to a directory where the `.cirrus.yml` is located and run:

```
cirrus validate
```

0 comments on commit 5c1bec2

Please sign in to comment.