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