forked from unders/docit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (35 loc) · 989 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.PHONY: help deps install gofmt oracle depgraph check release log shortlog clean vendor
RELEASE=v1.0.5
VERSION="github.com/unders/docit/cli.Version=$(RELEASE)"
BUILDSTAMP="github.com/unders/docit/cli.Buildstamp=$(shell date -u '+%Y-%m-%dT%I:%M%p')"
GIT_HASH="github.com/unders/docit/cli.Githash=$(shell git rev-parse HEAD)"
LDFLAGS=-ldflags "-X $(VERSION) -X $(BUILDSTAMP) -X $(GIT_HASH)"
GOOS ?= darwin
GOARCH ?= amd64
PROG=out/docit_$(RELEASE)_$(GOOS)_$(GOARCH)
help:
@cat Makefile
deps:
@bin/deps install
vendor:
@bin/vendor
install:
go install $(LDFLAGS)
gofmt:
gofmt -l -s -w .
oracle:
pythia github.com/unders/docit
depgraph:
godepgraph -s -horizontal github.com/unders/docit | dot -Tsvg -o doc/godepgraph.svg
check:
gometalinter ./... --deadline=45s --vendor
release: clean check
rice embed-go
go build $(LDFLAGS) -o $(PROG)
rm rice-box.go
log:
@git log --graph --oneline --decorate
shortlog:
@git shortlog
clean:
@if [ -f $(PROG) ] ; then rm $(PROG) ; fi