RUNTIME ?= docker BUILD_DIR ?= ./dist/ OUTFILE_ZIP ?= ./akkoma-fe.zip .PHONY: all all: build-docker build-fe package .PHONY: build-docker build-docker: $(RUNTIME) build -t akkoma-fe-builder . .PHONY: build-fe build-fe: ifeq ("$(wildcard $(BUILD_DIR))","") mkdir $(BUILD_DIR) else rm -rf $(BUILD_DIR) mkdir $(BUILD_DIR) endif $(RUNTIME) run -v ${PWD}/dist/:/app/dist/:Z akkoma-fe-builder build .PHONY: package package: ifneq ("$(wildcard $(OUTFILE_ZIP))","") rm $(OUTFILE_ZIP) endif zip -r -9 $(OUTFILE_ZIP) $(BUILD_DIR) # vim:set noexpandtab: