-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
73 lines (53 loc) · 1.5 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
NODE = node
NODE_OPTS = --use-strict
MOCHA = ./node_modules/.bin/_mocha
TEST = test/**/*_test.js
love:
@echo "Feel like makin' love."
test:
@$(NODE) $(NODE_OPTS) $(MOCHA) -R dot $(TEST)
spec:
@$(NODE) $(NODE_OPTS) $(MOCHA) -R spec $(TEST)
autotest:
@$(NODE) $(NODE_OPTS) $(MOCHA) -R dot --watch $(TEST)
autospec:
@$(NODE) $(NODE_OPTS) $(MOCHA) -R spec --watch $(TEST)
shrinkwrap:
npm shrinkwrap --dev
pack:
@file=$$(npm pack); echo "$$file"; tar tf "$$file"
publish:
npm publish
tag:
git tag "v$$($(NODE) -e 'console.log(require("./package").version)')"
clean:
-$(RM) *.tgz
npm prune --production
tsl: tsl/eu.xml
tsl: tsl/ee.xml
tsl: tsl/ee_test.xml
tsl/eu.xml:
mkdir -p tsl
wget "https://ec.europa.eu/information_society/policy/esignature/trusted-list/tl-mp.xml" -O "$@"
tsl/ee.xml:
mkdir -p tsl
wget "https://sr.riik.ee/tsl/estonian-tsl.xml" -O "$@"
tsl/ee_test.xml:
mkdir -p tsl
wget "https://open-eid.github.io/test-TL/EE_T.xml" -O "$@"
test/fixtures/rsa.key:
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out "$@"
test/fixtures/rsa.pub: test/fixtures/rsa.key
openssl rsa -pubout -in "$<" -out "$@"
test/fixtures/ecdsa.key:
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:prime256v1 -out "$@"
test/fixtures/ecdsa.pub: test/fixtures/ecdsa.key
openssl ec -in "$<" -pubout -out "$@"
.PHONY: love
.PHONY: test spec autotest autospec
.PHONY: shrinkwrap
.PHONY: pack publish tag
.PHONY: clean
.PHONY: tsl
.PRECIOUS: test/fixtures/rsa.key
.PRECIOUS: test/fixtures/ecdsa.key