update Makefile
This commit is contained in:
parent
e08858764a
commit
3db4c57c2b
20
Makefile
20
Makefile
@ -1,19 +1,8 @@
|
|||||||
-include environ.inc
|
-include environ.inc
|
||||||
|
|
||||||
BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
|
BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
|
||||||
|
IMAGE := neur0toxine/gitea-pages-server
|
||||||
ifeq ($(LOCAL), 1)
|
|
||||||
IMAGE := r.mills.io/prologic/pages-server
|
|
||||||
TAG := dev
|
|
||||||
else
|
|
||||||
ifeq ($(BRANCH), main)
|
|
||||||
IMAGE := prologic/pages-server
|
|
||||||
TAG := latest
|
TAG := latest
|
||||||
else
|
|
||||||
IMAGE := prologic/pages-server
|
|
||||||
TAG := dev
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
all: help
|
all: help
|
||||||
|
|
||||||
@ -21,17 +10,10 @@ all: help
|
|||||||
help: ## Show this help message
|
help: ## Show this help message
|
||||||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[$$()% a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
|
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[$$()% a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
|
||||||
|
|
||||||
ifeq ($(PUBLISH), 1)
|
|
||||||
.PHONY: image
|
.PHONY: image
|
||||||
image: ## Build the Docker image
|
image: ## Build the Docker image
|
||||||
@docker buildx build \
|
@docker buildx build \
|
||||||
--platform linux/amd64,linux/arm64 --push -t $(IMAGE):$(TAG) .
|
--platform linux/amd64,linux/arm64 --push -t $(IMAGE):$(TAG) .
|
||||||
else
|
|
||||||
.PHONY: image
|
|
||||||
image:
|
|
||||||
@docker build \
|
|
||||||
-t $(IMAGE):$(TAG) .
|
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean: ## Remove untracked files (excluding Git ignored files)
|
clean: ## Remove untracked files (excluding Git ignored files)
|
||||||
|
Loading…
Reference in New Issue
Block a user