-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (29 loc) · 942 Bytes
/
Copy pathMakefile
File metadata and controls
41 lines (29 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
CONTAINER_RUNTIME ?= $(shell if command -v docker >/dev/null 2>&1; then echo docker; else echo podman; fi)
ifeq ($(CONTAINER_RUNTIME),podman)
CONTAINER_BUILD_FLAGS ?= --pull=missing
else
CONTAINER_BUILD_FLAGS ?=
endif
HOST ?= 127.0.0.1
PORT ?= 8080
CONTAINER_NAME ?= keyman-demo
.PHONY: test test-integration tidy web-install web-build server-build build container-build container-run demo docker-build
test:
go test ./...
test-integration:
./scripts/run-softhsm-tests.sh
tidy:
go mod tidy
web-install:
cd web && pnpm install
web-build:
cd web && pnpm build
server-build:
go build -o bin/keymand ./cmd/keymand
build: web-build server-build
container-build:
$(CONTAINER_RUNTIME) build $(CONTAINER_BUILD_FLAGS) -f build/Dockerfile -t keyman:latest .
container-run:
$(CONTAINER_RUNTIME) run --rm --name $(CONTAINER_NAME) -p $(HOST):$(PORT):8080 keyman:latest
demo: container-build container-run
docker-build: container-build