Skip to content

Commit

Permalink
Add goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
pgollangi committed Sep 5, 2020
1 parent 27e2503 commit 9e4c68b
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 1 deletion.
115 changes: 115 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod download
# you may remove this if you don't need go generate
- go generate ./...

builds:
- main: ./cmd/fastget
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X main.version={{.Version}} -X main.build={{time "01/02/2006"}}
goos:
- linux
- windows
# - darwin
- <<: &build_defaults
binary: bin/fastget
main: ./cmd/fastget
hooks:
post:
- upx "{{ .Path }}"
id: macos
goos: [darwin]
goarch: [amd64]

- <<: *build_defaults
id: linux
goos: [linux]
goarch: [386, amd64]

- <<: *build_defaults
id: windows
goos: [windows]
goarch: [386, amd64]
archives:
- replacements:
darwin: macOS
386: i386
amd64: x86_64
format_overrides:
- goos: windows
format: zip
- id: nix
builds: [macos, linux]
<<: &archive_defaults
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
wrap_in_directory: false
replacements:
darwin: macOS
linux: linux
format: tar.gz
scoop:
url_template: "http://github.com/pgollangi/fastget/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
bucket:
owner: pgollangi
name: scoop-bucket
commit_author:
name: Prasanna Kumar Gollangi
email: [email protected]
commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}"
homepage: "https://github.com/pgollangi/fastget"
description: "A open source cli tool to ultra fast download files over HTTP(S)."
license: MIT

brews:
- name: fastget
ids:
- nix
description: "A open source cli tool to ultra fast download files over HTTP(S)."
commit_author:
name: Prasanna Kumar Gollangi
email: [email protected]
folder: Formula
goarm: 6
tap:
owner: pgollangi
name: homebrew-tap
url_template: "http://github.com/pgollangi/fastget/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# Packages your package depends on.
homepage: "https://github.com/pgollangi/fastget"
install: bin.install "bin/fastget"
test: |
system "#{bin}/fastget version"
nfpms:
-
id: foo
package_name: fastget
replacements:
amd64: x86_64
386: i386
darwin: macOS
vendor: Prasana Kumar Gollangi
homepage: https://github.com/pgollangi/fastget
maintainer: Prasanna Kumar Gollangi <[email protected]>
description: A open source cli tool to ultra fast download files over HTTP(S).
license: MIT
formats:
- deb
- rpm
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs'
- '^test:'
- '^Merge'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ Copyright © [Prasanna Kumar](https://pgollangi.com)
`fastget` is open-sourced software licensed under the [MIT](LICENSE) license.

## Author
Built with ❤ by [Prasanna Kumar](https://pgollangi.com)
Built with ❤ by [Prasanna Kumar](https://pgollangi.com/tabs/about/)

0 comments on commit 9e4c68b

Please sign in to comment.