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

Run prepublish build after versioning #12028

Merged
merged 2 commits into from Sep 3, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -244,8 +244,8 @@ ifneq ("$(I_AM_USING_VERDACCIO)", "I_AM_SURE")
echo "You probably don't know what you are doing"
exit 1
endif
$(MAKE) prepublish-build
$(YARN) lerna version $(VERSION) --exclude-dependents --force-publish=$(FORCE_PUBLISH) --no-push --yes --tag-version-prefix="version-e2e-test-"
$(MAKE) prepublish-build
$(YARN) lerna publish from-git --registry http://localhost:4873 --yes --tag-version-prefix="version-e2e-test-"
$(MAKE) clean

Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -8,7 +8,8 @@
"build": "make build",
"fix": "make fix",
"lint": "make lint",
"test": "make test"
"test": "make test",
"version": "yarn --immutable-cache && git add yarn.lock"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--immutable-cache is used here to bail when new dep needs to be fetched from network, which can happen when people edit external deps in package.json but forget to checkout the updated yarn.lock, and if that happens it should be addressed in separate commits instead of the version commit. In all, the version commit should include the following changes only:

  • Updated version in related package.json
  • Updated workspace@new-version resolution in yarn.lock

},
"devDependencies": {
"@babel/cli": "^7.10.4",
Expand Down