forked from kubedb/postgres-init-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (27 loc) · 743 Bytes
/
Makefile
File metadata and controls
33 lines (27 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
SHELL=/bin/bash -o pipefail
REGISTRY ?= kubedb
BIN := postgres-init
IMAGE := $(REGISTRY)/$(BIN)
TAG := $(shell git describe --exact-match --abbrev=0 2>/dev/null || echo "")
.PHONY: push
push: container
docker push $(IMAGE):$(TAG)
.PHONY: container
container:
wget -qO tini https://github.com/kubedb/tini/releases/download/v0.20.0/tini-static
chmod +x tini
docker build --pull -t $(IMAGE):$(TAG) .
rm tini
.PHONY: version
version:
@echo ::set-output name=version::$(TAG)
.PHONY: fmt
fmt:
@find . -path ./vendor -prune -o -name '*.sh' -exec shfmt -l -w -ci -i 4 {} \;
.PHONY: verify
verify: fmt
@if !(git diff --exit-code HEAD); then \
echo "files are out of date, run make fmt"; exit 1; \
fi
.PHONY: ci
ci: verify