@@ -40,20 +40,20 @@ if (!validSpecifiers.includes(versionSpecifier) && !isValidVersion) {
4040}
4141
4242; ( async ( ) => {
43- const { workspaceVersion, projectsVersionData } = await releaseVersion ( {
44- verbose : true ,
45- gitCommit : false ,
46- stageChanges : false ,
47- specifier : versionSpecifier ,
48- } )
43+ // const { workspaceVersion, projectsVersionData } = await releaseVersion({
44+ // verbose: true,
45+ // gitCommit: false,
46+ // stageChanges: false,
47+ // specifier: versionSpecifier,
48+ // })
4949
5050 // Update version.ts files with the new versions
5151 console . log ( '\n📦 Updating version.ts files...' )
52- execSync ( 'npx tsx scripts/update-version-files.ts' , { stdio : 'inherit' } )
52+ // execSync('npx tsx scripts/update-version-files.ts', { stdio: 'inherit' })
5353
5454 // Rebuild packages with correct versions
5555 console . log ( '\n🔨 Rebuilding packages with new versions...' )
56- execSync ( 'npx nx run-many --target=build --all' , { stdio : 'inherit' } )
56+ // execSync('npx nx run-many --target=build --all', { stdio: 'inherit' })
5757 console . log ( '✅ Build complete\n' )
5858
5959 // releaseChangelog should use the GitHub token with permission for tagging
@@ -71,64 +71,65 @@ if (!validSpecifiers.includes(versionSpecifier) && !isValidVersion) {
7171 const authHeader = `AUTHORIZATION: basic ${ Buffer . from ( `x-access-token:${ process . env . RELEASE_GITHUB_TOKEN } ` ) . toString ( 'base64' ) } `
7272 execSync ( `git config --local http.https://github.com/.extraheader "${ authHeader } "` )
7373
74- const result = await releaseChangelog ( {
75- versionData : projectsVersionData ,
76- version : workspaceVersion ,
77- verbose : true ,
78- gitCommit : false ,
79- stageChanges : false ,
80- } )
74+ // const result = await releaseChangelog({
75+ // versionData: projectsVersionData,
76+ // version: workspaceVersion,
77+ // verbose: true,
78+ // gitCommit: false,
79+ // stageChanges: false,
80+ // })
8181
8282 // npm publish with OIDC
8383 // not strictly necessary to restore the header but do it incase we require it later
8484 execSync ( `git config --local http.https://github.com/.extraheader "${ originalAuth } "` )
8585 // restore the GH token
8686 process . env . GITHUB_TOKEN = gh_token_bak
8787
88- const publishResult = await releasePublish ( {
89- registry : 'https://registry.npmjs.org/' ,
90- access : 'public' ,
91- tag : 'latest' ,
92- verbose : true ,
93- } )
88+ // const publishResult = await releasePublish({
89+ // registry: 'https://registry.npmjs.org/',
90+ // access: 'public',
91+ // tag: 'latest',
92+ // verbose: true,
93+ // })
9494
9595 // Publish gotrue-js as legacy mirror of auth-js
96- console . log ( '\n📦 Publishing @supabase/gotrue-js (legacy mirror)...' )
97- try {
98- execSync ( 'npx tsx scripts/publish-gotrue-legacy.ts --tag=latest' , { stdio : 'inherit' } )
99- } catch ( error ) {
100- console . error ( '❌ Failed to publish gotrue-js legacy package:' , error )
101- // Don't fail the entire release if gotrue-js fails
102- console . log ( '⚠️ Continuing with release despite gotrue-js publish failure' )
103- }
96+ // console.log('\n📦 Publishing @supabase/gotrue-js (legacy mirror)...')
97+ // try {
98+ // execSync('npx tsx scripts/publish-gotrue-legacy.ts --tag=latest', { stdio: 'inherit' })
99+ // } catch (error) {
100+ // console.error('❌ Failed to publish gotrue-js legacy package:', error)
101+ // // Don't fail the entire release if gotrue-js fails
102+ // console.log('⚠️ Continuing with release despite gotrue-js publish failure')
103+ // }
104104
105105 // ---- Create release branch + PR ----
106106 // switch back to the releaser GitHub token
107107 process . env . GITHUB_TOKEN = process . env . RELEASE_GITHUB_TOKEN
108- const version = result . workspaceChangelog ?. releaseVersion . rawVersion || workspaceVersion
108+ // const version = result.workspaceChangelog?.releaseVersion.rawVersion || workspaceVersion
109109
110110 // Validate version to prevent command injection
111111 // Version should match semver pattern or be a valid npm version specifier
112- if (
113- ! version ||
114- ! / ^ ( v ? \d + \. \d + \. \d + ( - [ a - z A - Z 0 - 9 . - ] + ) ? | p a t c h | m i n o r | m a j o r | p r e p a t c h | p r e m i n o r | p r e m a j o r | p r e r e l e a s e ) $ / . test (
115- version
116- )
117- ) {
118- console . error ( `❌ Invalid version format: ${ version } ` )
119- process . exit ( 1 )
120- }
121-
122- const branchName = `release-${ version } `
112+ // if (
113+ // !version ||
114+ // !/^(v?\d+\.\d+\.\d+(-[a-zA-Z0-9.-]+)?|patch|minor|major|prepatch|preminor|premajor|prerelease)$/.test(
115+ // version
116+ // )
117+ // ) {
118+ // console.error(`❌ Invalid version format: ${version}`)
119+ // process.exit(1)
120+ // }
121+
122+ const branchName = `release-test }`
123123
124124 try {
125125 execSync ( `git checkout -b ${ branchName } ` )
126- execSync ( 'git add CHANGELOG.md || true' )
127- execSync ( 'git add packages/**/CHANGELOG.md || true' )
126+ // create a small file and git add it
127+ execSync ( 'touch test.txt' )
128+ execSync ( 'git add test.txt' )
128129
129130 // Commit changes if any
130131 try {
131- execSync ( `git commit -m "chore(release ): publish version ${ version } "` )
132+ execSync ( `git commit -m "chore(repo ): test permissions "` )
132133 } catch {
133134 console . log ( 'No changes to commit' )
134135 }
@@ -137,18 +138,18 @@ if (!validSpecifiers.includes(versionSpecifier) && !isValidVersion) {
137138
138139 // Open PR using GitHub CLI
139140 execSync (
140- `gh pr create --base master --head ${ branchName } --title "chore(release ): ${ version } " --body "Automated release PR for ${ version } "` ,
141+ `gh pr create --base master --head ${ branchName } --title "chore(repo ): test permissions " --body "chore(repo): test permissions "` ,
141142 { stdio : 'inherit' }
142143 )
143144
144145 // Enable auto-merge
145146 execSync ( `gh pr merge --auto --squash` , { stdio : 'inherit' } )
146147
147- execSync ( 'git stash' )
148- console . log ( '✅ Stashed package.json changes' )
148+ // execSync('git stash')
149+ // console.log('✅ Stashed package.json changes')
149150 } catch ( err ) {
150151 console . error ( '❌ Failed to push release branch or open PR' , err )
151152 }
152153
153- process . exit ( Object . values ( publishResult ) . every ( ( r ) => r . code === 0 ) ? 0 : 1 )
154+ // process.exit(Object.values(publishResult).every((r) => r.code === 0) ? 0 : 1)
154155} ) ( )
0 commit comments