2023-01-03 21:12:41 +01:00
|
|
|
JSPKGMAN = "yarn"
|
|
|
|
ROOTDIR = $(dir $(CURDIR))
|
2023-01-07 13:24:15 +01:00
|
|
|
HEAD=$(shell git rev-parse --short HEAD)
|
|
|
|
|
2023-01-03 17:03:08 +01:00
|
|
|
|
2023-01-12 17:26:40 +01:00
|
|
|
all: build docker
|
|
|
|
|
2023-01-03 17:03:08 +01:00
|
|
|
dev:
|
|
|
|
$(JSPKGMAN) run vite dev
|
|
|
|
|
|
|
|
test:
|
|
|
|
$(JSPKGMAN) run vite check
|
|
|
|
|
2023-01-04 19:29:55 +01:00
|
|
|
build:
|
2023-01-07 15:25:11 +01:00
|
|
|
rm -rf $(CURDIR)/dist
|
2023-01-03 17:03:08 +01:00
|
|
|
$(JSPKGMAN) run vite build
|
2023-01-03 21:12:41 +01:00
|
|
|
|
|
|
|
|
2023-01-04 19:29:55 +01:00
|
|
|
docker:
|
|
|
|
podman build -t docker.io/jmbitci/crypttool .
|
2023-01-07 13:24:15 +01:00
|
|
|
podman build -t docker.io/jmbitci/crypttool:$(HEAD) .
|
2023-01-04 19:29:55 +01:00
|
|
|
podman push docker.io/jmbitci/crypttool
|
2023-01-07 13:24:15 +01:00
|
|
|
podman push docker.io/jmbitci/crypttool:$(HEAD)
|
2023-01-04 19:29:55 +01:00
|
|
|
|
2023-01-07 15:25:11 +01:00
|
|
|
|
2023-01-04 19:29:55 +01:00
|
|
|
|
2023-01-03 21:12:41 +01:00
|
|
|
#TODO get rid of -f and check whether files exist instead
|
|
|
|
clean:
|
|
|
|
rm -f $(CURDIR)/src/lib/crypttool.wasm
|
2023-01-06 21:12:58 +01:00
|
|
|
rm -rf $(CURDIR)/node_modules/*
|
|
|
|
rm -rf $(CURDIR)/dist
|