-
-
Notifications
You must be signed in to change notification settings - Fork 521
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
sea
as an alternative bin name to sea-orm-cli
#558
Conversation
I think this is a reasonable thought. |
It doesn't seem to be possible to configure aliases in the toml file, but you can configure multiple bins like this, which will generate two [[bin]]
name = "sea-orm-cli"
path = "src/main.rs"
[[bin]]
name = "sea"
path = "src/main.rs" it's ok? |
That's interesting! Certainly better than a breaking name change. I also think we need to set the default binary, other |
This has the minor drawback of reporting a compile warning at compile time: warning: /Projects/sea-orm/sea-orm-cli/Cargo.toml: file found to be present in multiple build targets |
The The only downside: Now Install and Usage: > cargo install sea-orm-cli
> sea-orm-cli help Or: > cargo install --bin sea
> sea help |
@tyt2y3 what do you think? |
Awesome |
@tyt2y3 Fixed CI compile error |
@tyt2y3 need approve workflow |
Can't it be merged yet? Is there anything that needs to be changed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
P.S Can't seaorm automatically generate migration files now? Except for the |
Not supported at the moment. I think you want something like |
Yes. Like the |
sea-orm-cli
to sea
sea
as an alternative bin name to sea-orm-cli
I feel that the command
sea-orm-cli
is too long and inconvenient to use, so it should be more convenient to simplify it tosea
now.What do you think?
Changes
The
sea
command is now an option, and a new bin file has been added to achieve this.The only downside:
bin/sea.rs
is a duplicate ofbin/main.rs
, but it has now been modified to have only one main function, so if there are changes, they are simply copied tosea.rs
. It won't be too much trouble to maintain.Now
cargo run
still defaults tosea-orm-cli
Install and Usage:
Or: