ci: update release script for v3

This commit is contained in:
Elliot DeNolf
2024-11-18 20:05:55 -05:00
parent cc04396a4f
commit 7fe207937f
2 changed files with 6 additions and 4 deletions

View File

@@ -74,7 +74,7 @@
"prepare-run-test-against-prod": "pnpm bf && rm -rf test/packed && rm -rf test/node_modules && rm -rf app && rm -f test/pnpm-lock.yaml && pnpm run script:pack --all --no-build --dest test/packed && pnpm runts test/setupProd.ts && cd test && pnpm i --ignore-workspace && cd ..", "prepare-run-test-against-prod": "pnpm bf && rm -rf test/packed && rm -rf test/node_modules && rm -rf app && rm -f test/pnpm-lock.yaml && pnpm run script:pack --all --no-build --dest test/packed && pnpm runts test/setupProd.ts && cd test && pnpm i --ignore-workspace && cd ..",
"prepare-run-test-against-prod:ci": "rm -rf test/node_modules && rm -rf app && rm -f test/pnpm-lock.yaml && pnpm run script:pack --all --no-build --dest test/packed && pnpm runts test/setupProd.ts && cd test && pnpm i --ignore-workspace && cd ..", "prepare-run-test-against-prod:ci": "rm -rf test/node_modules && rm -rf app && rm -f test/pnpm-lock.yaml && pnpm run script:pack --all --no-build --dest test/packed && pnpm runts test/setupProd.ts && cd test && pnpm i --ignore-workspace && cd ..",
"reinstall": "pnpm clean:all && pnpm install", "reinstall": "pnpm clean:all && pnpm install",
"release:alpha": "pnpm runts ./scripts/release.ts --bump prerelease --tag alpha", "release": "pnpm runts ./scripts/release.ts --tag latest",
"release:beta": "pnpm runts ./scripts/release.ts --bump prerelease --tag beta", "release:beta": "pnpm runts ./scripts/release.ts --bump prerelease --tag beta",
"runts": "cross-env NODE_OPTIONS=--no-deprecation node --no-deprecation --import @swc-node/register/esm-register", "runts": "cross-env NODE_OPTIONS=--no-deprecation node --no-deprecation --import @swc-node/register/esm-register",
"script:gen-templates": "pnpm runts ./scripts/generate-template-variations.ts", "script:gen-templates": "pnpm runts ./scripts/generate-template-variations.ts",

View File

@@ -29,13 +29,13 @@ const execaOpts: execa.Options = { stdio: 'inherit' }
const args = minimist(process.argv.slice(2)) const args = minimist(process.argv.slice(2))
const { const {
bump = 'patch', // Semver release type bump, // Semver release type: major, minor, patch, premajor, preminor, prepatch, prerelease
changelog = false, // Whether to update the changelog. WARNING: This gets throttled on too many commits changelog = false, // Whether to update the changelog. WARNING: This gets throttled on too many commits
'dry-run': dryRun, 'dry-run': dryRun,
'git-tag': gitTag = true, // Whether to run git tag and commit operations 'git-tag': gitTag = true, // Whether to run git tag and commit operations
'git-commit': gitCommit = true, // Whether to run git commit operations 'git-commit': gitCommit = true, // Whether to run git commit operations
versionOverride = undefined, versionOverride = undefined,
tag = 'latest', tag, // Tag to publish to: latest, beta, canary
} = args } = args
const logPrefix = dryRun ? chalk.bold.magenta('[dry-run] >') : '' const logPrefix = dryRun ? chalk.bold.magenta('[dry-run] >') : ''
@@ -344,7 +344,9 @@ async function question(message: string): Promise<string> {
function header(message: string, opts?: { enable?: boolean }) { function header(message: string, opts?: { enable?: boolean }) {
const { enable } = opts ?? {} const { enable } = opts ?? {}
if (!enable) return if (!enable) {
return
}
console.log(chalk.bold.green(`${message}\n`)) console.log(chalk.bold.green(`${message}\n`))
} }