File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ docs: lint
44 - yek src/ saev README.md AGENTS.md > docs/ api/ llms.txt
55 uv run mkdocs build --config-file docs/ mkdocs.yml
66
7+ validate-zenodo :
8+ sh scripts/ validation-zenodo.sh
9+
710test :
811 uv run pytest -m " not slow and not integration" tests
912
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # Validate .zenodo.json with the same pinned zenodraft as CI.
3+
4+ set -eu
5+
6+ workflow=" .github/workflows/validate-zenodo.yaml"
7+
8+ # e.g. "zenodraft@0.14.1" from the `npm install zenodraft@0.14.1` line.
9+ spec=$( grep -oE ' zenodraft@[0-9]+\.[0-9]+\.[0-9]+' " $workflow " | head -n 1)
10+ if [ -z " $spec " ]; then
11+ echo " could not read pinned zenodraft version from $workflow " >&2
12+ exit 1
13+ fi
14+
15+ if command -v npx > /dev/null 2>&1 ; then
16+ exec npx " $spec " metadata validate .zenodo.json
17+ elif command -v bunx > /dev/null 2>&1 ; then
18+ exec bunx " $spec " metadata validate .zenodo.json
19+ elif command -v dx > /dev/null 2>&1 ; then
20+ exec dx " $spec " metadata validate .zenodo.json
21+ elif command -v deno > /dev/null 2>&1 ; then
22+ exec deno run --allow-read " npm:$spec " metadata validate .zenodo.json
23+ else
24+ echo " no JS runner found (tried: npx bunx dx deno)" >&2
25+ exit 1
26+ fi
You can’t perform that action at this time.
0 commit comments