-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (39 loc) · 891 Bytes
/
Makefile
File metadata and controls
49 lines (39 loc) · 891 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOMOD=$(GOCMD) mod
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOLINT=$(GOCMD)lint
BINARY_NAME=mybinary
BINARY_UNIX=$(BINARY_NAME)_unix
.PHONY: all build pull download tool lint clean run help
all: build run
build:
swag init
$(GOBUILD) -v .
pull:
git pull
cp app.ini conf/app.ini
download:
go mod init
$(GOMOD) download
run:
@echo "gin-auth are running"
./gin-auth
tool:
go tool vet . |& grep -v vendor \
gofmt -w .
lint:
$(GOLINT) ./...
clean:
rm -rf gin-auth
$(GOCLEAN) -i .
help:
@echo "make: compile packages and dependencies"
@echo "make pull: pull project from github and cp app.ini"
@echo "make download: download all packages from go.mod"
@echo "make run: to run ./gin-auth"
@echo "make tool: run specified go tool"
@echo "make lint: golint ./..."
@echo "make clean: remove object files and cached files"