File tree 1 file changed +36
-1
lines changed
1 file changed +36
-1
lines changed Original file line number Diff line number Diff line change 3
3
import 'zx/globals' ;
4
4
import { constants } from './common.mjs' ;
5
5
6
+ console . log ( constants ) ;
7
+ const snapshot = `---
8
+ 'gatsby-plugin-clerk': patch
9
+ '@clerk/chrome-extension': patch
10
+ '@clerk/localizations': patch
11
+ '@clerk/clerk-js': patch
12
+ '@clerk/clerk-sdk-node': patch
13
+ '@clerk/backend': patch
14
+ '@clerk/fastify': patch
15
+ '@clerk/nextjs': patch
16
+ '@clerk/shared': patch
17
+ '@clerk/themes': patch
18
+ '@clerk/clerk-react': patch
19
+ '@clerk/remix': patch
20
+ '@clerk/types': patch
21
+ '@clerk/clerk-expo': patch
22
+ ---
23
+
24
+ Snapshot release
25
+ ` ;
26
+
6
27
const prefix = argv . name || argv . _ [ 0 ] || 'snapshot' ;
7
28
8
29
await $ `npx json -I -f ${ constants . ChangesetConfigFile } -e "this.changelog = false"` ;
9
- await $ `npx changeset pre exit || true` ;
30
+
31
+ try {
32
+ // exit pre-release mode if we're in it
33
+ await $ `npx changeset pre exit` ;
34
+ // bump the version of all affected packages
35
+ // this will remove the prerelease versions
36
+ // but will also clear the changeset .md files
37
+ await $ `npx changeset version` ;
38
+ // generate a temp .md file that indicates that all packages have changes
39
+ // in order to force a snapshot release
40
+ await $ `touch .changeset/snap.md && echo ${ snapshot } > .changeset/snap.md` ;
41
+ } catch ( e ) {
42
+ // otherwise, do nothing
43
+ }
44
+
10
45
const res = await $ `npx changeset version --snapshot ${ prefix } ` ;
11
46
const success = ! res . stderr . includes ( 'No unreleased changesets found' ) ;
12
47
You can’t perform that action at this time.
0 commit comments