akkoma-fe/Makefile

27 lines
505 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
2024-09-05 22:23:02 +00:00
all: build-fe package
2023-08-01 14:41:41 +00:00
.PHONY: build-fe
build-fe:
ifeq ("$(wildcard $(BUILD_DIR))","")
mkdir $(BUILD_DIR)
else
rm -rf $(BUILD_DIR)
mkdir $(BUILD_DIR)
endif
2024-09-05 22:23:02 +00:00
$(RUNTIME) build --build-arg NODE_ENV=$(NODE_ENV) --output type=local,dest=./dist/ .
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: