Skip to content

Commit

Permalink
maketask base on goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
ry023 committed Jan 24, 2020
1 parent f92962f commit 81d340c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ vendor/*

# artifacts
/builds
dist/
19 changes: 19 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
builds:
- main: ./cmd/lolp
goos:
- darwin
- linux
goarch:
- amd64
archive:
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
language: go
go:
- 1.11.x
- 1.10.x
- 1.9.x
- 1.13.x
- 1.12.x
script:
- make ci
notifications:
Expand Down
28 changes: 9 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@ TEST_OPTIONS=-timeout 30s -parallel $(NCPU)

default: test

deps:
go get -u github.com/golang/dep/cmd/dep
dep ensure

install_goreleaser:
eval $(CMD_INSTALL_GORELEASER)
@which goreleaser || eval $(CMD_INSTALL_GORELEASER)

depsdev: deps install_goreleaser
depsdev: export GO111MODULE=off
depsdev: install_goreleaser
go get -u golang.org/x/lint/golint
go get github.com/pierrre/gotestcover
go get -u github.com/Songmu/ghch/cmd/ghch
Expand All @@ -35,19 +32,12 @@ integration:
lint:
golint -set_exit_status $(TEST)

ci: deps test

clean:
rm -rf ./builds
mkdir ./builds

build: clean
goxz -n $(NAME) -pv $(VERSION) -d ./builds -os=linux,darwin -arch=amd64 ./cmd/lolp
ci: test

ghr:
ghr -u pepabo v$(VERSION) builds
build: install_goreleaser
goreleaser --skip-publish --snapshot --rm-dist

dist: build
@test -z $(GITHUB_TOKEN) || $(MAKE) ghr
dist: install_goreleaser
goreleaser --rm-dist

.PHONY: default dist test deps
.PHONY: default dist test

0 comments on commit 81d340c

Please sign in to comment.