restic/Makefile

22 lines
447 B
Makefile
Raw Permalink Normal View History

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