-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmakefile
47 lines (35 loc) · 921 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
VERSION=`git describe --tags`
TIMESTAMP=`date +%FT%T%z`
LDFLAGS=-ldflags "-X main.version=${VERSION} -X main.timestamp=${TIMESTAMP}"
.PHONY: all
all:
@echo "make <cmd>"
@echo ""
@echo "commands:"
@echo " build - build the source code"
@echo " test - test the source code"
@echo " lint - lint the source code"
@echo " fmt - format the source code"
@echo " install - install dependencies"
lint:
@golangci-lint run
fmt:
@go fmt ./...
build: lint
@go build -i ${LDFLAGS}
build_static:
env CGO_ENABLED=0 env GOOS=linux GOARCH=amd64 go build ${LDFLAGS}
compile: lint
@go build ./...
deploy:
@./deploy.sh
watch:
@./run.sh
test: build
@go test ./...
install:
@npm install -g yarn
@yarn install
@go get -u github.com/unchartedsoftware/witch
@go get github.com/golangci/golangci-lint/cmd/[email protected]
$(shell sudo ./install_image_upscale.sh)