forked from flaccid/helm-znc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (36 loc) · 1.3 KB
/
Makefile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
DOCKER_REGISTRY = index.docker.io
IMAGE_NAME = helm-chart-znc
IMAGE_VERSION = latest
IMAGE_ORG = flaccid
IMAGE_TAG = $(DOCKER_REGISTRY)/$(IMAGE_ORG)/$(IMAGE_NAME):$(IMAGE_VERSION)
WORKING_DIR := $(shell pwd)
.DEFAULT_GOAL := build
.PHONY: helm-package helm-push
helm-package:: ## builds the helm package into a tarball
@helm package ./charts/znc
helm-push:: ## pushes the helm package
@echo TODO
docker-release:: build push ## Builds and pushes the docker image to the registry
docker-push:: ## Pushes the docker image to the registry
@docker push $(IMAGE_TAG)
docker-build:: ## Builds the docker image locally
@echo http_proxy=$(HTTP_PROXY) http_proxy=$(HTTPS_PROXY)
@docker build --pull \
--build-arg=http_proxy=$HTTP_PROXY \
--build-arg=https_proxy=$HTTPS_PROXY \
-t $(IMAGE_TAG) $(WORKING_DIR)
docker-run:: ## Runs the docker image locally
@docker run -it \
$(DOCKER_REGISTRY)/$(IMAGE_ORG)/$(IMAGE_NAME):$(IMAGE_VERSION)
# A help target including self-documenting targets (see the awk statement)
define HELP_TEXT
Usage: make [TARGET]... [MAKEVAR1=SOMETHING]...
Available targets:
endef
export HELP_TEXT
help: ## This help target
@cat .banner
@echo
@echo "$$HELP_TEXT"
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / \
{printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)