File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /.cache /
2+ /bad
13/node_modules /
24/nvm /
35/package-lock.json
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ release: $(NODE)
2323 npm publish
2424
2525clean ::
26- $(RM ) package-lock.json strace.txt
26+ $(RM ) package-lock.json strace.txt bad
2727
2828distclean ::
29- $(RM ) -r node_modules
29+ $(RM ) -r node_modules .cache
Original file line number Diff line number Diff line change 1+ M := .cache/makes
2+ $(shell [ -d $M ] || git clone -q https ://github.com/makeplus/makes $M)
3+ include $M/init.mk
4+ include $M/node.mk
5+
6+ export LD_LIBRARY_PATH := ../libys/lib
7+
8+ LIBYS := $(LD_LIBRARY_PATH ) /libys.so.0.2.3
9+
10+ NODES := $(shell \
11+ curl -s https://nodejs.org/download/release/ \
12+ | ys - -e '.split(/href/) .filter(/="v/) \
13+ .map(\(replace(_ /.*v(\d*\.\d+\.\d+).*/ "$$1"))) \
14+ .mapv(say) && nil' \
15+ | sort -rV \
16+ | uniq)
17+
18+ MAKE-THIS := $(MAKE ) -f test-node-versions.mk
19+
20+ test : $(NODES )
21+
22+ $(NODES ) :
23+ $(MAKE-THIS ) test-node NODE-VERSION=$@
24+
25+ test-node : $(NODE ) $(LIBYS ) node_modules
26+ @echo ' === $(NODE-VERSION) ==========================================='
27+ NODE_PATH=lib \
28+ node -e ' YS = require("yamlscript"); ys = new YS(); console.log(ys.load(fs.readFileSync(0, "utf8")))' \
29+ <<< $$ ' !YS-v0:\nfoo:: sum(3 .. 9)' || \
30+ (echo; ( echo ' Bad version: $(NODE-VERSION)' | tee -a bad ); echo)
31+
32+ $(LIBYS ) :
33+ $(MAKE ) -C ../libys build
34+
35+ node_modules :
36+ $(MAKE ) test NODE-VERSION=24.8.0
You can’t perform that action at this time.
0 commit comments