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 5b481fc19e - added the docker push test
- added the option to skip tls verify
2015-09-23 14:21:54 +01:00

44 lines
983 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}:${VERSION} .
static:
mkdir -p bin
CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w' -o bin/${NAME}
push: docker
sudo docker tag -f ${AUTHOR}/${NAME}:${VERSION} docker.io/${AUTHOR}/${NAME}:${VERSION}
sudo docker push docker.io/${AUTHOR}/${NAME}:${VERSION}
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