MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / publishNextBetaVersion

Function publishNextBetaVersion

runok.cjs:604–629  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

602 },
603
604 publishNextBetaVersion() {
605 const currentBetaVersion = this.getCurrentBetaVersion()
606 if (!currentBetaVersion) {
607 console.error('No beta version found.')
608 process.exit(1)
609 }
610
611 const nextBetaVersion = semver.inc(currentBetaVersion, 'prerelease', 'beta')
612 console.log(`Publishing version: ${nextBetaVersion}`)
613
614 try {
615 // Save original version
616 const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'))
617 const originalVersion = packageJson.version
618 execSync(`npm version ${nextBetaVersion} --no-git-tag-version`)
619 execSync('npm publish --tag beta')
620 console.log(`Successfully published ${nextBetaVersion}`)
621
622 // Revert to original version
623 execSync(`npm version ${originalVersion} --no-git-tag-version`)
624 console.log(`Reverted back to original version: ${originalVersion}`)
625 } catch (error) {
626 console.error('Error publishing package:', error)
627 process.exit(1)
628 }
629 },
630
631 async runnerCreateTests(featureName) {
632 // create runner tests for feature

Callers

nothing calls this directly

Calls 1

logMethod · 0.80

Tested by

no test coverage detected