You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
400 B
Makefile
21 lines
400 B
Makefile
VERSION_REGEX := 's/(v[0-9\.]+)/$(version)/g'
|
|
|
|
build:
|
|
go build -o smug *.go
|
|
|
|
test:
|
|
go test .
|
|
|
|
coverage:
|
|
go test -coverprofile=coverage.out
|
|
go tool cover -html=coverage.out
|
|
|
|
release:
|
|
ifndef GITHUB_TOKEN
|
|
$(error GITHUB_TOKEN is not defined)
|
|
endif
|
|
sed -E -i.bak $(VERSION_REGEX) 'main.go' && rm main.go.bak
|
|
git tag -a $(version) -m '$(version)'
|
|
git push origin $(version)
|
|
goreleaser --rm-dist
|