Skip to content

Commit

Permalink
ci: update release script for v3
Browse files Browse the repository at this point in the history
  • Loading branch information
denolfe committed Nov 19, 2024
1 parent cc04396 commit 7fe2079
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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: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",
"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",
"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",
Expand Down
8 changes: 5 additions & 3 deletions scripts/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ const execaOpts: execa.Options = { stdio: 'inherit' }
const args = minimist(process.argv.slice(2))

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
'dry-run': dryRun,
'git-tag': gitTag = true, // Whether to run git tag and commit operations
'git-commit': gitCommit = true, // Whether to run git commit operations
versionOverride = undefined,
tag = 'latest',
tag, // Tag to publish to: latest, beta, canary
} = args

const logPrefix = dryRun ? chalk.bold.magenta('[dry-run] >') : ''
Expand Down Expand Up @@ -344,7 +344,9 @@ async function question(message: string): Promise<string> {

function header(message: string, opts?: { enable?: boolean }) {
const { enable } = opts ?? {}
if (!enable) return
if (!enable) {
return
}

console.log(chalk.bold.green(`${message}\n`))
}
Expand Down

0 comments on commit 7fe2079

Please sign in to comment.