-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
41 lines (30 loc) · 1.1 KB
/
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
.PHONY: default static-server deps fmt server static-release-all release-all all static-all run test
export GOPATH:=$(shell pwd)/vendor
# Set the GOPROXY environment variable
export GOPROXY=https://goproxy.io,direct
# export http_proxy=socks5://127.0.0.1:1080
# export https_proxy=%http_proxy%
BUILDTAGS=release
default: all
deps:
go mod tidy -v
# go mod vendor -v
fmt:
go fmt -mod=mod ./...
static-server:
CGO_ENABLED=0 go install --tags '$(BUILDTAGS)' -ldflags '-s -w -extldflags "-static"' -mod=mod github.com/larisgo/laravel-echo-server/main/laravel-echo-server
server:
go install --tags '$(BUILDTAGS)' -ldflags '-s -w' -mod=mod github.com/larisgo/laravel-echo-server/main/laravel-echo-server
release: BUILDTAGS=release
static-release-all: fmt release static-server
release-all: fmt release server
all: fmt server
static-all: fmt static-server
clean:
go clean -mod=mod -r ./...
run:
GOOS="" GOARCH="" go install -mod=mod github.com/larisgo/laravel-echo-server/main/laravel-echo-server
vendor/bin/laravel-echo-server
test:
go clean -testcache
go test -race -cover -covermode=atomic -mod=mod -v ./...