From d8015ce550d92c4476abeb88366faf802fea72c2 Mon Sep 17 00:00:00 2001 From: Harry Bagdi Date: Thu, 7 Oct 2021 23:01:09 -0700 Subject: [PATCH] add goreleaser --- .goreleaser.yml | 37 +++++++++++++++++++++++++++++++++++++ main.go | 1 - 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .goreleaser.yml diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..1cbff67 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,37 @@ +builds: +- env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + - windows + - freebsd + goarch: + - amd64 + flags: + - -trimpath +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}" +nfpms: +- file_name_template: '{{ .ProjectName }}_{{ .Tag }}_{{ .Arch }}' + homepage: https://github.com/hbagdi/y2j + description: YAML to JSON converter + maintainer: Harry Bagdi + license: Apache License v2.0 + formats: + - deb + - rpm +brews: +- tap: + owner: hbagdi + name: homebrew-tap + commit_author: + name: Harry Bagdi + email: harrybagdi@gmail.com + homepage: "https://github.com/hbagdi/y2j" + description: YAML to JSON converter + skip_upload: true + test: | + system "#{bin}/y2j", "-help" diff --git a/main.go b/main.go index e774ec9..bbf935c 100644 --- a/main.go +++ b/main.go @@ -17,7 +17,6 @@ func die(format string, a ...interface{}) { os.Exit(1) } - func main() { flag.Parse() if *help {