-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
45 lines (36 loc) · 926 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
APP=gin-framework
.PHONY: build
build:
@go build -o releases/${APP}
.PHONY: windows
windows:
@GOARCH=amd64 GOOS=windows go build -o releases/${APP}-windows
.PHONY: linux
linux:
@GOARCH=amd64 GOOS=linux go build -o releases/${APP}-linux
.PHONY: darwin
darwin:
@GOARCH=amd64 GOOS=darwin go build -o releases/${APP}-darwin
.PHONY: lint
lint:
@golint ./...
.PHONY: generate
generate:
@go generate -x
.PHONY: docker
docker:
@docker build -t mqenergy/${APP}:latest .
.PHONY: clean
clean:
@go clean -i .
@rm -rf releases
.PHONY: help
help:
@echo "2. make build - [go build]"
@echo "3. make windows - [make window package]"
@echo "4. make linux - [make linux package]"
@echo "5. make darwin - [make darwin package]"
@echo "6. make lint - [golint ./...]"
@echo "7. make generate - [go generate -x]"
@echo "8. make docker - [make docker images]"
@echo "9. make clean - [remove releases files and cached files]"