mirror of
https://github.com/fbartels/cloudron-drone-app.git
synced 2024-11-22 05:10:59 +00:00
0ac667af18
This also updates the gear and adds an optional bash script instead of the Makefile Signed-off-by: Felix Bartels <felix@9wd.eu>
27 lines
610 B
Makefile
27 lines
610 B
Makefile
DOCKER_REPO ?= fbartels
|
|
DOCKER_IMAGE := cloudron-surfer
|
|
VERSION := $(shell grep cloudron-surfer Dockerfile | cut -d' ' -f 5 | cut -d@ -f 2)
|
|
|
|
ifeq ($(shell command -v podman 2> /dev/null),)
|
|
CMD=docker
|
|
else
|
|
CMD=podman
|
|
endif
|
|
|
|
.PHONY: default
|
|
default: build
|
|
|
|
.PHONY: build
|
|
build:
|
|
$(CMD) build . -t $(DOCKER_IMAGE)
|
|
|
|
.PHONY: tag
|
|
tag: build
|
|
$(CMD) tag $(DOCKER_IMAGE) $(DOCKER_REPO)/$(DOCKER_IMAGE):latest
|
|
$(CMD) tag $(DOCKER_IMAGE) $(DOCKER_REPO)/$(DOCKER_IMAGE):$(VERSION)
|
|
|
|
.PHONY: push
|
|
push: tag
|
|
$(CMD) push $(DOCKER_REPO)/$(DOCKER_IMAGE):latest
|
|
$(CMD) push $(DOCKER_REPO)/$(DOCKER_IMAGE):$(VERSION)
|
|
|