Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
lrstanley authored Apr 10, 2022
1 parent d455cb8 commit cd0ecf6
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
.DEFAULT_GOAL := build

DIRS=bin
BINARY=vault-unseal

VERSION=$(shell git describe --tags --always --abbrev=0 --match=v* 2> /dev/null | sed -r "s:^v::g" || echo 0)

$(info $(shell mkdir -p $(DIRS)))
BIN=$(CURDIR)/bin
export GOBIN=$(CURDIR)/bin

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-12s\033[0m %s\n", $$1, $$2}'

Expand All @@ -25,8 +17,10 @@ upgrade-deps-patch: ## Upgrade all dependencies to the latest patch release.
clean: ## Cleans up generated files/folders from the build.
/bin/rm -rfv "dist/" "${BINARY}"

build: fetch clean ## Compile and generate a binary.
CGO_ENABLED=0 go build -ldflags '-d -s -w -extldflags=-static' -tags=netgo,osusergo,static_build -installsuffix netgo -buildvcs=false -trimpath -o "${BINARY}"

debug: clean
go run *.go

prepare: fetch clean ## Prepare the dependencies needed for a build.

build: prepare ## Compile and generate a binary.
CGO_ENABLED=0 go build -ldflags '-d -s -w -extldflags=-static' -tags=netgo,osusergo,static_build -installsuffix netgo -buildvcs=false -trimpath -o "${BINARY}"

0 comments on commit cd0ecf6

Please sign in to comment.