Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): add more 'autogenerated' comments #3655

Merged
merged 1 commit into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,24 @@ jobs:
run: node . run posttest
env:
DEPLOY_VERSION: testing


check_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install dependencies
run: |
node . install --ignore-scripts --no-audit
- name: Rebuild the docs
run: make freshdocs
- name: Git should not be dirty
run: node scripts/git-dirty.js


licenses:
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ docs/content/using-npm/config.md: scripts/config-doc.js lib/utils/config/*.js
docs/content/commands/npm-%.md: lib/%.js scripts/config-doc-command.js lib/utils/config/*.js
node scripts/config-doc-command.js $@ $<

freshdocs:
touch lib/utils/config/definitions.js
touch scripts/config-doc-command.js
touch scripts/config-doc.js
make docs

test: dev-deps
node bin/npm-cli.js test

Expand Down Expand Up @@ -109,4 +115,4 @@ publish: gitclean ls-ok link test smoke-tests docs prune
release: gitclean ls-ok docs prune
@bash scripts/release.sh

.PHONY: all latest install dev link docs clean uninstall test man docs-clean docsclean release ls-ok dev-deps prune
.PHONY: all latest install dev link docs clean uninstall test man docs-clean docsclean release ls-ok dev-deps prune freshdocs
16 changes: 16 additions & 0 deletions scripts/git-dirty.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env node
const { spawnSync } = require('child_process')
const changes = spawnSync('git', ['status', '--porcelain', '-uno'])
const stdout = changes.stdout.toString('utf8')
const stderr = changes.stderr.toString('utf8')
const { status, signal } = changes
console.log(stdout)
console.error(stderr)
if (status || signal) {
console.error({ status, signal })
process.exitCode = status || 1
}
if (stdout.trim() !== '')
throw new Error('git dirty')
else
console.log('git clean')