Compare commits
7 Commits
7f0274c02e
...
v20230411
Author | SHA1 | Date | |
---|---|---|---|
|
5d4eb1922d | ||
|
e59099570c | ||
|
49116b883b | ||
|
98e5ebf825 | ||
|
e75ec99fcd | ||
|
5be3153522 | ||
|
3e8c266ae0 |
18
Makefile
18
Makefile
@@ -1,4 +1,4 @@
|
|||||||
.PHONY: default build clean release
|
.PHONY: default build clean release require_clean_git
|
||||||
|
|
||||||
-include .env
|
-include .env
|
||||||
|
|
||||||
@@ -10,8 +10,18 @@ SHELL := /bin/bash
|
|||||||
|
|
||||||
default: build
|
default: build
|
||||||
|
|
||||||
guard:
|
require_clean_git:
|
||||||
@ if [ -z "$(git status --porcelain)" ]; then echo "git repo not clean"; exit 1; fi
|
git update-index -q --ignore-submodules --refresh
|
||||||
|
git diff-files --quiet --ignore-submodules
|
||||||
|
git diff-index --cached --quiet --ignore-submodules HEAD --
|
||||||
|
@status=$$(git status --porcelain); \
|
||||||
|
if test "x$${status}" = x; then \
|
||||||
|
echo "No untracked files detected"; \
|
||||||
|
else \
|
||||||
|
echo "Untracked files detected" >&2; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
podman build --build-arg VERSION=$(VERSION) --tag ${REPO}/${IMAGENAME}:$(VERSION) .
|
podman build --build-arg VERSION=$(VERSION) --tag ${REPO}/${IMAGENAME}:$(VERSION) .
|
||||||
@@ -19,7 +29,7 @@ build:
|
|||||||
clean:
|
clean:
|
||||||
podman image rm ${REPO}/${IMAGENAME}:$(VERSION)
|
podman image rm ${REPO}/${IMAGENAME}:$(VERSION)
|
||||||
|
|
||||||
release: guard build
|
release: require_clean_git build
|
||||||
$(eval TMP_MESSAGE := $(shell podman run --rm -it ${REPO}/${IMAGENAME}:$(VERSION) /usr/sbin/dnsmasq --version))
|
$(eval TMP_MESSAGE := $(shell podman run --rm -it ${REPO}/${IMAGENAME}:$(VERSION) /usr/sbin/dnsmasq --version))
|
||||||
git tag -a v$(VERSION) -m "${TMP_MESSAGE}"
|
git tag -a v$(VERSION) -m "${TMP_MESSAGE}"
|
||||||
git push origin v$(VERSION)
|
git push origin v$(VERSION)
|
||||||
|
Reference in New Issue
Block a user