Skip to content

Commit

Permalink
Add logs to release job (#48690)
Browse files Browse the repository at this point in the history
Adding more logs for GA release job

---------

Co-authored-by: Steven <steven@ceriously.com>
  • Loading branch information
huozhi and styfle authored Apr 21, 2023
1 parent 8089d0a commit 4f1b0f7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/start-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ async function main() {
shell: true,
})

console.log(`Running pnpm release-${isCanary ? 'canary' : 'stable'}...`)
const child = execa(`pnpm release-${isCanary ? 'canary' : 'stable'}`, {
stdio: 'pipe',
shell: true,
Expand All @@ -61,19 +62,30 @@ async function main() {
child.stderr.pipe(process.stderr)

if (isCanary) {
console.log("Releasing canary: enter 'y'\n")
child.stdin.write('y\n')
} else {
if (semverType === 'minor') {
console.log('Releasing minor: cursor down > 1\n')
child.stdin.write(ansiEscapes.cursorDown(1))
}
if (semverType === 'major') {
console.log('Releasing major: curser down > 1')
child.stdin.write(ansiEscapes.cursorDown(1))
console.log('Releasing major: curser down > 2')
child.stdin.write(ansiEscapes.cursorDown(1))
}
if (semverType === 'patch') {
console.log('Releasing patch: cursor stay\n')
}
console.log("Enter newline")
child.stdin.write('\n')
console.log("Enter y")
child.stdin.write('y\n')
}
console.log('Await child process...')
await child
console.log('Release process is finished')

if (isCanary) {
try {
Expand Down

0 comments on commit 4f1b0f7

Please sign in to comment.