RUNTIME ?= docker BUILD_DIR ?= ./dist/ OUTFILE_ZIP ?= ./akkoma-fe.zip NODE_ENV ?= production .PHONY: all all: build-fe package .PHONY: build-fe build-fe: ifeq ("$(wildcard $(BUILD_DIR))","") mkdir $(BUILD_DIR) else rm -rf $(BUILD_DIR) mkdir $(BUILD_DIR) endif $(RUNTIME) build --build-arg NODE_ENV=$(NODE_ENV) --output type=local,dest=./dist/ . .PHONY: package package: ifneq ("$(wildcard $(OUTFILE_ZIP))","") rm $(OUTFILE_ZIP) endif zip -r -9 $(OUTFILE_ZIP) $(BUILD_DIR) # vim:set noexpandtab: