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

chore: add steps to pre-commit hook to build json examples & dev schema #132

Merged
merged 4 commits into from
Mar 5, 2024

Conversation

jessicamcinchak
Copy link
Member

@jessicamcinchak jessicamcinchak commented Mar 5, 2024

Our examples & schema are correct in dist & in /examples/data on main, but the generated examples and schema.json on main can fall out of sync with CI tests still passing if you simply forget to run either of these commands manually before pushing your changes (see #131) - too easy to forget & causing confusion with consumers!

This adds pnpm build-json-examples & pnpm build-schema:dev commands to the pre-commit hook if the branch is not main. This should keep all files on main tagged at the @next version, and not impact the Github Actions workflow for publishing from main to dist with a correct published version number.

@jessicamcinchak jessicamcinchak merged commit 3c0f977 into main Mar 5, 2024
3 checks passed
@jessicamcinchak jessicamcinchak deleted the jess/build-examples-and-schema-precommit-hook branch March 5, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants