Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
feat: add goreleaser config
Browse files Browse the repository at this point in the history
create a release using goreleaser
add dist folder to ignore list

add self documented Makefile
  • Loading branch information
Sascha Andres authored and robphoenix committed May 23, 2018
1 parent 00aa748 commit 4c096fc
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -24,3 +24,4 @@ _testmain.go
*.exe
*.test
*.prof
dist
22 changes: 22 additions & 0 deletions .goreleaser.yml
@@ -0,0 +1,22 @@
build:
ldflags: -s -w -X main.Version={{.Version}}
binary: trawl
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
archive:
format: tar.gz
snapshot:
name_template: "{{.Commit}}"
fpm:
vendor: Rob Phoenix
homepage: https://github.com/robphoenix/trawl
maintainer: Rob Phoenix
description: A strong fishing net for dragging along the sea bottom to collect IP addresses and similar flotsam & jetsam
formats:
- deb
bindir: /usr/local/bin
14 changes: 14 additions & 0 deletions Makefile
@@ -0,0 +1,14 @@
snapshot: # create a snapshot
goreleaser --snapshot --rm-dist --skip-validate --skip-publish

release: # create a release build
goreleaser --rm-dist

install: # just compile and install
go install

# Absolutely awesome: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

.DEFAULT_GOAL := help
2 changes: 1 addition & 1 deletion main.go
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/rdegges/go-ipify"
)

const (
var (
// Version of current release
Version = "v0.4.0"
)
Expand Down

0 comments on commit 4c096fc

Please sign in to comment.