forked from resumic/schema
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (22 loc) · 669 Bytes
/
Makefile
File metadata and controls
28 lines (22 loc) · 669 Bytes
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
# Build Info Variables
FILE = ./VERSION
RESUMIC_VERSION = `cat $(FILE)`
GITCOMMIT = `git describe --tags --always --dirty`
CODEPATH = `go list -m`
SUFFIX = "-dev"
export GO111MODULE = on
# Build Rules
pre-build:
@go get github.com/gobuffalo/packr/v2/packr2
@packr2
build: pre-build
@go build -ldflags "-X $(CODEPATH)/cmd.version=$(RESUMIC_VERSION)$(SUFFIX) -X $(CODEPATH)/cmd.gitCommit=$(GITCOMMIT)" -o resumic
@packr2 clean
release: pre-build
@go build -ldflags "-s -w -X $(CODEPATH)/cmd.version=$(RESUMIC_VERSION) -X $(CODEPATH)/cmd.gitCommit=$(GITCOMMIT)" -o resumic
@packr2 clean
test: build
go test -v ./...
.PHONY: clean
clean: ./resumic
@rm resumic