Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make app deploy to wait till deployment finishes #212

Merged
merged 4 commits into from
Jul 29, 2022
Merged

Conversation

zaiste
Copy link
Contributor

@zaiste zaiste commented Jul 28, 2022

Also enabled the CI environment variable along with the --dispatch option to skip the deployment await.

Improved and refined the command output.

CleanShot 2022-07-28 at 14 26 54@2x

Also enabled the `CI` environment variable along with
the `--dispatch` option to skip the deployment await.

Improved and refined the command output.
@zaiste zaiste added this to the 1.12 milestone Jul 28, 2022
@zaiste zaiste self-assigned this Jul 28, 2022
@zaiste zaiste linked an issue Jul 28, 2022 that may be closed by this pull request
@zaiste zaiste requested a review from lkostrowski July 28, 2022 12:25
@lkostrowski
Copy link
Member

First look at these box-sections - awesome!!


export const command = 'deploy';
export const desc = 'Deploy this Saleor App repository to Vercel';

export const builder: CommandBuilder = (_) => _;
export const builder: CommandBuilder = (_) =>
_.option('dispatch', {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm not familiar with "dispatch" term in this context, so without reading description, I wouldn't firgure out what dispatch is.
Is this term some pattern used in other apps? Will it be understandable for community?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can change this. Intuitively I used a term from the queueing nomenclature i.e. putting a long-running job on an execution queue is usually called dispatching; in other words we don't wait for the result, the execution is started and run asynchronously.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good 👍

If we have a "better name" later (maybe more known for frontend devs) we can always add alias

src/cli/app/deploy.ts Outdated Show resolved Hide resolved
);
console.log(`\nYour Vercel URL: ${chalk.cyan(`https://${url}`)}`);
console.log('');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's easier to see newlines this way when composing messages. With the \n at the end it's a bit difficult to see. I don't have a strong preference here. It's just slightly more practical.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about

console.log('\n');

It's a nitpick but this way it's pretty obvious what it does. But up2u

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicks are always welcome. Here, that would be a double newline, but let's discuss it on Monday. We have some ideas for a global approach.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ach, ok, I'm not used to CLI too much, was using mainly Ink for that. Its fine

src/lib/vercel.ts Outdated Show resolved Hide resolved
src/lib/vercel.ts Outdated Show resolved Hide resolved
src/lib/vercel.ts Outdated Show resolved Hide resolved
@zaiste
Copy link
Contributor Author

zaiste commented Jul 28, 2022

@lkostrowski PR refined. WDYT?

@zaiste zaiste requested a review from lkostrowski July 28, 2022 15:04
Copy link
Member

@lkostrowski lkostrowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👏


export const command = 'deploy';
export const desc = 'Deploy this Saleor App repository to Vercel';

export const builder: CommandBuilder = (_) => _;
export const builder: CommandBuilder = (_) =>
_.option('dispatch', {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good 👍

If we have a "better name" later (maybe more known for frontend devs) we can always add alias

);
console.log(`\nYour Vercel URL: ${chalk.cyan(`https://${url}`)}`);
console.log('');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about

console.log('\n');

It's a nitpick but this way it's pretty obvious what it does. But up2u

@2can 2can merged commit 064c7f8 into main Jul 29, 2022
@2can 2can deleted the improve-app-deploy branch July 29, 2022 15:29
@michalina-graczyk
Copy link
Member

image
@zaiste There is still an undefined in the Dashboard URL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[CLI] app deploy command improvement
4 participants