restic/Makefile
Jonas Forsberg 04ec1f51d8 added guard
2023-04-12 17:02:55 +02:00

22 lines
447 B
Makefile

.PHONY: default build clean
-include .env
VERSION=0.15.1-1.2
SHELL := /bin/bash
guard:
@ if [ -z "$(git status --porcelain)" ]; then echo "git repo not clean"; exit 1; fi
default: build
build:
podman build --build-arg VERSION=$(VERSION) --tag docker.io/bardak/restic:$(VERSION) .
clean:
podman image rm docker.io/bardak/restic:$(VERSION)
push: guard build
podman push --creds $(USERNAME):$(PASSWORD) docker.io/bardak/restic:$(VERSION)