chore: remove no-vcs option (moved to a later stage if github is someday adopted

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2023-07-31 23:00:53 +02:00
parent 2d5abedf1a
commit 2650edb61e
Signed by: kjuulh
GPG Key ID: 9AA7BC13CE474394
2 changed files with 30 additions and 14 deletions

View File

@ -27,3 +27,32 @@ please:
or as `cuddle.please.yaml` or as `cuddle.please.yaml`
See docs for more information about installation and some such See docs for more information about installation and some such
## Checklist
### 0.1 Milestone
- [ ] Hide unneccessary commands
- [ ] Redo configuration frontend
- [ ] Refactor command.rs into smaller bits so that bits are easier to test
- [ ] Add reporter for PR and Repositories
- [ ] Setup temporary git name and email to use for git committing
### 0.2 Milestone
- [ ] Add docs
- [ ] Add asciidoc
- [ ] Add examples
- [ ] Fix drone config
- [ ] Releaser
- [ ] On main/master
- [ ] tbd...
### 0.3 Milestone
- [ ] Add inquire for missing values when needed (when not running in ci or have a proper tty)
### 0.x Milestone
- [ ] Add github support
- [ ] Create docker image

View File

@ -73,15 +73,6 @@ struct GlobalArgs {
#[arg(long, global = true, help_heading = "Global")] #[arg(long, global = true, help_heading = "Global")]
dry_run: bool, dry_run: bool,
/// no version control system, forces please to allow no .git/ or friends
#[arg(
long,
global = true,
help_heading = "Global",
long_help = "no version control system. This forces cuddle-please to accept that it won't be running in git. All fields will have to be fed through values in the given commands."
)]
no_vcs: bool,
/// Inject configuration from stdin /// Inject configuration from stdin
#[arg( #[arg(
long, long,
@ -402,11 +393,7 @@ impl Command {
} }
fn get_git(&self, current_dir: &Path) -> anyhow::Result<VcsClient> { fn get_git(&self, current_dir: &Path) -> anyhow::Result<VcsClient> {
if self.global.no_vcs { VcsClient::new_git(current_dir)
Ok(VcsClient::new_noop())
} else {
VcsClient::new_git(current_dir)
}
} }
fn get_from_environment(&self, config: &mut PleaseConfig) -> anyhow::Result<()> { fn get_from_environment(&self, config: &mut PleaseConfig) -> anyhow::Result<()> {