Open pixelzoom opened 4 years ago
What would the ideal behavior be? It sounds like a message immediately after saying it's not ready would be good (instead of having the message be part of the thrown error, so that it would print "Aborted rc deployment (reverting the version change and checking out master)" near the top?
An error/throw is useful, so that it will flag things as "not successfully completed".
Relevant code:
if ( !await booleanPrompt( `Please test the built version of ${repo}.\nIs it ready to deploy`, noninteractive ) ) {
// Abort version update
await setRepoVersion( repo, previousVersion, message );
await gitPush( repo, branch );
// Abort checkout
await checkoutMaster( repo, true );
throw new Error( 'Aborted rc deployment (aborted version change too).' );
}
Something like:
Is it ready to deploy [y/N]?N
Reverting work done for deploy.
...
"Reverting version to 1.0.0-rc.0" instead of "Bumping version to 1.0.0-rc.0" would be a bonus.
And definitely not throwing an Error. The user requested to abort the deploy, and the process is doing that correctly. If it couldn't abort, then an Error would be appropriate.
I started doing an RC deploy. When I answered "N" to "Is it ready to deploy?", it continued to do something (checking out master?), and then failed with the Error shown below.
First, it would be nice if it told you that it was reverting to master, not continuing to deploy.
Second, I'm wondering if this Error is even really an error. It looks like something that's expected.
Assigning to @ariel-phet to prioritize and assign.