This repository has been archived on 2023-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
vault-sidekick/Makefile
Rohith 12c5c37746 - adding the static and release stages to the makefile
- moving the render code into utils
- fixed up the dockerfile for testing
- adding the ignore on release
- adding the fix to makefile
2015-09-21 17:32:13 +01:00

40 lines
813 B
Makefile

NAME=vault-sidekick
AUTHOR=gambol99
HARDWARE=$(shell uname -m)
VERSION=$(shell awk '/Version =/ { print $$3 }' version.go | sed 's/"//g')
.PHONY: test authors changelog build docker static release
default: build
build:
mkdir -p bin
go build -o bin/${NAME}
docker: build
sudo docker build -t ${AUTHOR}/${NAME} .
static:
mkdir -p bin
CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w' -o bin/${NAME}
release: static
mkdir -p release
gzip -c bin/${NAME} > release/${NAME}_${VERSION}_linux_${HARDWARE}.gz
rm -f release/${NAME}
clean:
rm -rf ./bin 2>/dev/null
authors:
git log --format='%aN <%aE>' | sort -u > AUTHORS
test:
go get
go get github.com/stretchr/testify/assert
go test -v
changelog: release
git log $(shell git tag | tail -n1)..HEAD --no-merges --format=%B > changelog