Skip to content

Commit

Permalink
add auto-update resolutions script
Browse files Browse the repository at this point in the history
  • Loading branch information
Segment Github authored and silesky committed Aug 2, 2022
1 parent 93c8f1f commit b32f0b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
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-resolutions.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-resolutions.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 Resolutions"
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 resolutions needed"
fi

0 comments on commit b32f0b3

Please sign in to comment.