Guard against yarn-issue-1882 (#12188)

This commit is contained in:
Huáng Jùnliàng 2020-10-15 18:15:11 -04:00 committed by GitHub
parent 9018716905
commit 19dc038907
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -214,6 +214,7 @@ prepublish-build: clean-lib clean-runtime-helpers
$(MAKE) prepublish-build-standalone clone-license $(MAKE) prepublish-build-standalone clone-license
prepublish: prepublish:
$(MAKE) check-yarn-bug-1882
$(MAKE) bootstrap-only $(MAKE) bootstrap-only
$(MAKE) prepublish-build $(MAKE) prepublish-build
IS_PUBLISH=true $(MAKE) test IS_PUBLISH=true $(MAKE) test
@ -227,6 +228,13 @@ publish: prepublish
$(YARN) release-tool publish $(YARN) release-tool publish
$(MAKE) clean $(MAKE) clean
check-yarn-bug-1882:
ifneq ("$(shell grep 3155328e5 .yarn/releases/yarn-*.cjs -c)", "0")
echo "Your version of yarn is affected by https://github.com/yarnpkg/berry/issues/1882"
echo "Please run `sed -i -e "s/3155328e5/4567890e5/g" .yarn/releases/yarn-*.cjs`"
exit 1
endif
publish-ci: prepublish publish-ci: prepublish
ifneq ("$(NPM_TOKEN)", "") ifneq ("$(NPM_TOKEN)", "")
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc