From 52401fd45ae98f44a00350df66fdba313e3deab3 Mon Sep 17 00:00:00 2001 From: isaacs Date: Thu, 19 Aug 2021 09:02:54 -0700 Subject: [PATCH] chore: update config snapshot when manually making docs The better to avoid having to do patches like 771a1cbf7. PR-URL: https://github.com/npm/cli/pull/3664 Credit: @isaacs Close: #3664 Reviewed-by: @wraithgar --- Makefile | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8762574dac52d..6fb39c704ff1d 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,12 @@ all: docs docs: mandocs htmldocs +# don't regenerate the snapshot if we're generating +# snapshots, since presumably we just did that. mandocs: dev-deps $(mandocs) + @ ! [ $${npm_lifecycle_event} = "snap" ] && \ + ! [ $${npm_lifecycle_event} = "postsnap" ] && \ + TAP_SNAPSHOT=1 node test/lib/utils/config/definitions.js || true $(version_mandocs): package.json diff --git a/package.json b/package.json index 9cbe9377b76bd..52a6fc9574f66 100644 --- a/package.json +++ b/package.json @@ -209,7 +209,7 @@ "test": "tap", "check-coverage": "tap", "snap": "tap", - "postsnap": "make -s docs/content/*/*.md", + "postsnap": "make -s mandocs", "test:nocleanup": "NO_TEST_CLEANUP=1 npm run test --", "sudotest": "sudo npm run test --", "sudotest:nocleanup": "sudo NO_TEST_CLEANUP=1 npm run test --",