Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
68 lines (53 sloc) 1.32 KB
VERSION = $(shell godzil show-version)
CURRENT_REVISION = $(shell git rev-parse --short HEAD)
BUILD_LDFLAGS = "-s -w -X github.com/Songmu/godzil.revision=$(CURRENT_REVISION)"
ifdef update
u=-u
endif
export GO111MODULE=on
.PHONY: deps
deps:
go get ${u} -d
.PHONY: devel-deps
devel-deps: deps
GO111MODULE=off go get ${u} \
golang.org/x/lint/golint \
github.com/mattn/goveralls \
github.com/Songmu/godzil/cmd/godzil \
github.com/Songmu/goxz/cmd/goxz \
github.com/Songmu/gocredits/cmd/gocredits \
github.com/tcnksm/ghr \
github.com/Songmu/statikp/cmd/statikp
.PHONY: test
test: deps
go test
.PHONY: lint
lint: devel-deps
go vet
golint -set_exit_status
.PHONY: cover
cover: devel-deps
goveralls
.PHONY: build
build: deps
go build -ldflags=$(BUILD_LDFLAGS) ./cmd/godzil
.PHONY: install
install: build
mv godzil "$(shell go env GOPATH)/bin"
.PHONY: bump
bump: devel-deps
godzil release
CREDITS: devel-deps go.sum
gocredits -w
.PHONY: crossbuild
crossbuild: CREDITS
goxz -pv=v$(VERSION) -build-ldflags=$(BUILD_LDFLAGS) \
-os=linux,darwin -d=./dist/v$(VERSION) ./cmd/*
.PHONY: upload
upload:
ghr v$(VERSION) dist/v$(VERSION)
.PHONY: release
release: bump crossbuild upload
.PHONY: assets
assets:
statikp -m -src testdata/assets -dotfiles
You can’t perform that action at this time.