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+ set -e
2+
3+ # Use the tag captured during the prepare step as the docs version, so the
4+ # output reflects the nodejs/node release it was generated from (e.g. v26.0.0)
5+ # rather than the Node.js runtime version running this build (process.version).
6+ NODE_VERSION=$( cat .node-tag)
7+
18node bin/cli.mjs generate \
29 -t orama-db \
310 -t legacy-json \
@@ -6,10 +13,12 @@ node bin/cli.mjs generate \
613 -i " ./node/doc/api/*.md" \
714 -o " ./out" \
815 -c " ./node/CHANGELOG.md" \
16+ -v " $NODE_VERSION " \
917 --type-map " ./node/doc/type-map.json" \
1018 --index " ./node/doc/api/index.md" \
1119 --log-level debug
1220
1321cp ./node/doc/api/* .md " ./out"
1422
1523rm -rf node/
24+ rm -f .node-tag
Original file line number Diff line number Diff line change 1- # Clone the repository with no checkout and shallow history
2- git clone --depth 1 --filter=blob:none --sparse https://github.com/nodejs/node.git
1+ set -e
2+
3+ # Determine the latest stable release tag on nodejs/node (skip pre-releases
4+ # like `-rc`/`-nightly`, taking the highest version-sorted tag).
5+ LATEST_TAG=$( git ls-remote --tags --refs --sort=' -v:refname' \
6+ https://github.com/nodejs/node.git ' v*' \
7+ | awk -F/ ' $NF !~ /-/ { print $NF; exit }' )
8+
9+ if [ -z " $LATEST_TAG " ]; then
10+ echo " Could not determine the latest nodejs/node release tag" >&2
11+ exit 1
12+ fi
13+
14+ # Persist the tag so the build step can use it as the docs version
15+ echo " $LATEST_TAG " > .node-tag
16+
17+ echo " Building docs for nodejs/node $LATEST_TAG "
18+
19+ # Clone the repository at that tag with no checkout and shallow history
20+ git clone --depth 1 --branch " $LATEST_TAG " --filter=blob:none --sparse \
21+ https://github.com/nodejs/node.git
322
423# Move into the cloned directory
524cd node
You can’t perform that action at this time.
0 commit comments