akkoma-fe/Makefile

31 lines
602 B
Makefile
Raw Normal View History

2023-08-01 14:41:41 +00:00
RUNTIME ?= docker
BUILD_DIR ?= ./dist/
OUTFILE_ZIP ?= ./akkoma-fe.zip
2023-09-15 22:15:14 +00:00
NODE_ENV ?= production
2023-08-01 14:41:41 +00:00
.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
2023-09-15 22:15:14 +00:00
$(RUNTIME) run -e NODE_ENV=$(NODE_ENV) -v ${PWD}/dist/:/app/dist/:Z akkoma-fe-builder build
2023-08-01 14:41:41 +00:00
.PHONY: package
package:
ifneq ("$(wildcard $(OUTFILE_ZIP))","")
rm $(OUTFILE_ZIP)
endif
2023-08-04 11:12:05 +00:00
zip -r -9 $(OUTFILE_ZIP) $(BUILD_DIR)
2023-08-01 14:41:41 +00:00
# vim:set noexpandtab: