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

add auto-update resolutions script #564

Merged
merged 1 commit into from
Aug 3, 2022
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"dev": "yarn workspace with-next-js run dev",
"postinstall": "husky install",
"changeset": "changeset",
"update-versions-and-changelogs": "changeset version && yarn version-run-all",
"update-versions-and-changelogs": "changeset version && yarn version-run-all && bash scripts/update-lockfile.sh",
"release": "yarn build:packages --force && changeset publish && yarn postpublish-run-all && git push origin --tags --no-verify",
"postpublish-run-all": "yarn workspaces foreach -vpt --no-private run postpublish",
"version-run-all": "yarn workspaces foreach -vpt --no-private run version",
Expand Down
11 changes: 11 additions & 0 deletions scripts/update-lockfile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# Changesets does not support yarn, so if the resolutions change, we want to commit them as part of the version pipeline.
echo "Checking if yarn.lock is up-to-date"
yarn install
if [[ -n $(git status --porcelain | grep yarn.lock) ]]; then
echo "Adding yarn.lock..."
git add yarn.lock
# The yarn.lock will be auto-commited by the changeset github action
else
echo "No yarn.lock updates needed"
fi