Skip to content

Commit

Permalink
feat: publish flarectl using GoReleaser (cloudflare#524)
Browse files Browse the repository at this point in the history
* feat: publish flarectl using GoReleaser

* tune goreleaser

Co-authored-by: Patryk Szczygłowski <[email protected]>
  • Loading branch information
dunglas and patryk authored Sep 1, 2020
1 parent 38003bd commit 46bba11
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.idea
.vscode/
cmd/flarectl/dist/
cmd/flarectl/flarectl
29 changes: 29 additions & 0 deletions cmd/flarectl/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
before:
hooks:
- cp ../../LICENSE .
- go mod download
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm
- arm64
binary: flarectl
mod_timestamp: '{{ .CommitTimestamp }}'
archives:
- replacements:
darwin: macos
format_overrides:
- goos: windows
format: zip
format: tar.xz
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
checksum:
disable: true
changelog:
skip: true
9 changes: 8 additions & 1 deletion cmd/flarectl/flarectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@ import (
"github.com/urfave/cli"
)

var (
version = "dev"
commit = "none"
date = "unknown"
builtBy = "unknown"
)

var api *cloudflare.API

func main() {
app := cli.NewApp()
app.Name = "flarectl"
app.Usage = "Cloudflare CLI"
app.Version = "2017.10.0"
app.Version = version
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "account-id",
Expand Down

0 comments on commit 46bba11

Please sign in to comment.