letsdiscodev / disco-cli

MIT License
3 stars 0 forks source link

remove `--deploy` flag from `projects:add` ? #20

Closed gregsadetsky closed 7 months ago

gregsadetsky commented 7 months ago

@antoineleclair

I'm porting the CLI as you know -- I just tried to use projects:add with --deploy, but I get:

Deploying my-flask-site1, version 1
Deployment 1 enqueued
Starting deployment
Cloning git@github.com:letsdiscodev/example-flask-sqlite-site.git
Deployment failed
Restoring previous deployment

(after all of the instructions re: webhook, and deploy key)

considering that the deployment key is not set at that point on the github repo (since the project was just created as part of the projects:add command), how can/could --deploy work..? should we remove it?

antoineleclair commented 7 months ago

It's currently used when the project is public and you don't need do to anything before deploying, like setting env variables.

One example where it's useful right now is when installing the Postgres addon.

disco projects:add --name postgres --github-repo https://github.com/letsdiscodev/disco-addon-postgres --deploy

But it's true that it's equivalent to

disco projects:add --name postgres --github-repo https://github.com/letsdiscodev/disco-addon-postgres
disco deploy --project postgres

In that sense we could get rid of it, if we want to avoid command overlap.

gregsadetsky commented 7 months ago

Ahh of course of course!! I didn't consider that, I thought it might have been an older command.

All good then! No big worries about command overlap, we can look more closely at that later