From a3761e242e99405b16c6135e86d24c6b964c4be9 Mon Sep 17 00:00:00 2001 From: Chetan Sarva Date: Wed, 5 Jan 2022 17:07:16 -0500 Subject: [PATCH] build: cleanup targets --- Makefile | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e95ebd7..5cb589c 100644 --- a/Makefile +++ b/Makefile @@ -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: @@ -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 @@ -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