2023-03-11 09:55:59 +03:00
|
|
|
.PHONY: deps dev build image clean
|
2021-12-09 05:47:48 +03:00
|
|
|
|
|
|
|
GOCMD=go
|
2023-03-11 09:55:59 +03:00
|
|
|
IMAGE := r.mills.io/prologic/zs
|
|
|
|
TAG := latest
|
2021-12-09 05:47:48 +03:00
|
|
|
|
|
|
|
all: build
|
|
|
|
|
|
|
|
deps:
|
2023-03-12 10:44:34 +03:00
|
|
|
@$(GOCMD) install go.mills.io/zs@latest
|
2023-03-16 11:37:41 +03:00
|
|
|
@$(GOCMD) install github.com/tdewolff/minify/v2/cmd/minify@latest
|
2021-12-09 05:47:48 +03:00
|
|
|
|
|
|
|
dev : DEBUG=1
|
|
|
|
dev : build
|
2023-03-12 10:44:34 +03:00
|
|
|
@zs serve
|
2021-12-09 05:47:48 +03:00
|
|
|
|
|
|
|
build:
|
|
|
|
@zs build
|
|
|
|
|
|
|
|
ifeq ($(PUBLISH), 1)
|
|
|
|
image:
|
2023-03-11 09:55:59 +03:00
|
|
|
@docker buildx build --platform linux/amd64,linux/arm64 --push -t $(IMAGE):$(TAG) .
|
2021-12-09 05:47:48 +03:00
|
|
|
else
|
|
|
|
image:
|
2023-03-11 09:55:59 +03:00
|
|
|
@docker build -t $(IMAGE):$(TAG) .
|
2021-12-09 05:47:48 +03:00
|
|
|
endif
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@git clean -f -d -X
|