-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
47 lines (32 loc) · 1.7 KB
/
Makefile
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
42
43
44
45
46
47
version=0.2.0
extras=cli web-app
pkgs=lib $(extras)
.PHONY: all audit ci clean cli format i license-check lint start test
start: all
(cd web-app && npm run dev)
cli: cli/opentdf-ctl-$(version).tgz
clean:
rm -f *.tgz
rm -f */*.tgz
rm -rf */dist
rm -rf */node_modules
ci: lib/opentdf-sdk-$(version).tgz
for x in $(extras); do (cd $$x && npm uninstall @opentdf/sdk && npm ci && npm i ../lib/opentdf-sdk-$(version).tgz) || exit 1; done
i:
(cd lib && npm i && npm pack)
for x in $(extras); do (cd $$x && npm uninstall @opentdf/sdk && npm i && npm i ../lib/opentdf-sdk-$(version).tgz) || exit 1; done
all: ci lib/opentdf-sdk-$(version).tgz web-app/opentdf-web-app-$(version).tgz
cli/opentdf-ctl-$(version).tgz: lib/opentdf-sdk-$(version).tgz $(shell find cli -not -path '*/dist*' -and -not -path '*/coverage*' -and -not -path '*/node_modules*')
(cd cli && npm uninstall @opentdf/sdk && npm ci && npm i ../lib/opentdf-sdk-$(version).tgz && npm pack)
web-app/opentdf-web-app-$(version).tgz: lib/opentdf-sdk-$(version).tgz $(shell find web-app -not -path '*/dist*' -and -not -path '*/coverage*' -and -not -path '*/node_modules*')
(cd web-app && npm uninstall @opentdf/sdk && npm ci && npm i ../lib/opentdf-sdk-$(version).tgz && npm pack && npm run build)
lib/opentdf-sdk-$(version).tgz: $(shell find lib -not -path '*/dist*' -and -not -path '*/coverage*' -and -not -path '*/node_modules*')
(cd lib && npm ci --including=dev && npm pack)
dist: lib/opentdf-sdk-$(version).tgz
(cp lib/opentdf-sdk-$(version).tgz ./)
audit:
for x in $(pkgs); do (cd $$x && npm audit --omit dev) || exit 1; done
format license-check lint test: ci
for x in $(pkgs); do (cd $$x && npm run $@) || exit 1; done
doc:
cd lib && npm ci && npm run doc