From 93f4e15229986cef4143f8ba0f3588796338399f Mon Sep 17 00:00:00 2001 From: Shawn Allen Date: Mon, 7 Jan 2019 16:03:15 -0800 Subject: [PATCH] Fix compare-published for private package (docs) --- script/compare-published | 8 +++++--- script/release | 5 ++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/script/compare-published b/script/compare-published index df2cb276..28c627fa 100755 --- a/script/compare-published +++ b/script/compare-published @@ -15,8 +15,10 @@ echo "📦 Comparing Primer modules published @${tag}..." echo "module${s}tag${s}published${s}local" for package in $packages; do module=$(jq -r .name "$package/package.json") - v_published=$(npm info "$module@$tag" .version) - v_local=$(jq -Mr .version "$package/package.json") - echo "${module}${s}${tag}${s}${v_published:-x}${s}${v_local}" + if [[ "$(jq -r .private $package/package.json)" != "true" ]]; then + v_published=$(npm info "$module@$tag" .version || echo '0.0.0') + v_local=$(jq -Mr .version "$package/package.json") + echo "${module}${s}${tag}${s}${v_published:-x}${s}${v_local}" + fi done ) | column -t -s=${s} diff --git a/script/release b/script/release index 854f8eb9..eb0a2749 100755 --- a/script/release +++ b/script/release @@ -3,9 +3,8 @@ set -e echo "📦 Publishing latest release..." -# note: try-publish should exit cleanly if it detects a duplicate -# published version -npx lerna exec $@ -- $(dirname $0)/try-publish +# note: try-publish should exit cleanly if it hits a published version +npx lerna exec --ignore='@primer/css-docs' $@ -- $(pwd)/script/try-publish # Build and publish storybook npx build-storybook -o build