Skip to content

Commit 31abbba

Browse files
authored
chore: A way to skip checks before publishing, if we know tests already pass (#2281)
1 parent fcec8d8 commit 31abbba

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ pnpm publish --dry-run # (if alpha, --tag alpha)
4343
```
4444

4545
5. If everything looks okay, then `pnpm publish` (if alpha, `--tag alpha`)
46+
47+
> **Tip:** If you already know all prepublish checks pass (tests, types, publish tag validation), you can skip them to speed up
48+
> publishing:
49+
>
50+
> ```bash
51+
> SKIP_ALL_CHECKS=true pnpm publish # (if alpha, --tag alpha)
52+
> ```
53+
4654
6. Rebase _release_ branch on _main_
4755
7. Generate and edit release notes on GitHub
4856
8. Run `npx automd@latest`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"test:browser": "vitest run --browser.enabled --project browser",
3333
"test:browser:watch": "vitest --browser.enabled --project browser",
3434
"test:coverage": "vitest --coverage run",
35-
"nightly-build": "pnpm --filter typegpu --filter @typegpu/noise --filter unplugin-typegpu prepublishOnly --skip-all-checks",
35+
"nightly-build": "SKIP_ALL_CHECKS=true pnpm --filter typegpu --filter @typegpu/noise --filter unplugin-typegpu prepublishOnly",
3636
"changes": "tgpu-dev-cli changes"
3737
},
3838
"devDependencies": {

packages/tgpu-dev-cli/prepack.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,11 @@ async function main() {
133133

134134
const args = arg({
135135
'--skip-publish-tag-check': Boolean,
136-
'--skip-all-checks': Boolean,
137136
});
138137

139-
if (!args['--skip-publish-tag-check'] && !args['--skip-all-checks']) {
138+
const skipAllChecks = process.env.SKIP_ALL_CHECKS === 'true';
139+
140+
if (!args['--skip-publish-tag-check'] && !skipAllChecks) {
140141
verifyPublishTag();
141142
}
142143

@@ -199,7 +200,7 @@ async function main() {
199200
// First build
200201
...(await Promise.allSettled([withStatusUpdate('build', $`pnpm build`)])),
201202
// Then the rest
202-
...(args['--skip-all-checks']
203+
...(skipAllChecks
203204
? []
204205
: await Promise.allSettled([
205206
withStatusUpdate('style', $`pnpm -w test:style`),

0 commit comments

Comments
 (0)