-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
49 lines (36 loc) · 1.18 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
42
43
44
45
46
47
48
49
SHELL := bash
build: clean
go build ./bin/vproxy
snapshot: clean
goreleaser release --snapshot --clean
install-formula: snapshot
cp -a dist/homebrew/Formula/*.rb /usr/local/Homebrew/Library/Taps/jittering/homebrew-kegs/Formula/
build-linux:
GOOS=linux go build -o vproxy-linux-x64 ./bin/vproxy/
build-mac:
GOOS=darwin go build -o vproxy-macos-x64 ./bin/vproxy/
build-windows:
GOOS=windows go build -o vproxy-windows-x64 ./bin/vproxy/
release: clean
goreleaser release --clean
check-style:
goreleaser check
goreleaser --snapshot --skip-validate --clean
# get cops
cops=$$(cat /usr/local/Homebrew/Library/Taps/jittering/homebrew-kegs/.rubocop.yml \
| grep -v Enabled | grep -v '#' | grep -v '^$$' | tr ':\n' ','); \
brew style --display-cop-names --except-cops="$${cops}" ./dist/*.rb;
build-brew:
go build -ldflags \
"-X main.version=snapshot \
-X main.commit=$$(git rev-parse HEAD) \
-X main.date=$$(date -u +%Y-%m-%dT%H:%M:%SZ) \
-X main.builtBy=$$(whoami)" \
-o vproxy ./bin/vproxy/
sudo mv vproxy /opt/homebrew/opt/vproxy/bin/vproxy
sudo pkill -f 'vproxy daemon'
clean:
rm -f ./vproxy*
rm -rf ./dist/
install: build
sudo cp -a ./vproxy /usr/local/bin/vproxy