Skip to content

Commit

Permalink
build: cleanup targets
Browse files Browse the repository at this point in the history
  • Loading branch information
chetan committed Jan 5, 2022
1 parent 44984e1 commit a3761e2
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@

SHELL := bash

build: clean
go build ./bin/vproxy

snapshot: clean
goreleaser release --snapshot --rm-dist

install-formula: build
install-formula: snapshot
cp -a dist/vproxy.rb dist/vproxy-head.rb /usr/local/Homebrew/Library/Taps/jittering/homebrew-kegs/Formula/

build-linux:
Expand All @@ -14,6 +19,14 @@ build-mac:
release: clean
goreleaser release --rm-dist

check-style:
goreleaser check
goreleaser --snapshot --skip-validate --rm-dist
# 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 -o vproxy ./bin/vproxy/
sudo mv vproxy /usr/local/opt/vproxy/bin/vproxy
Expand All @@ -23,8 +36,5 @@ clean:
rm -f ./vproxy*
rm -rf ./dist/

vproxy:
go build ./bin/vproxy

install: vproxy
sudo cp -a ./vproxy /usr/local/bin/vproxy

0 comments on commit a3761e2

Please sign in to comment.