chore: add chore to commit types, include explicit conditional logic

This commit is contained in:
rzmk 2023-11-29 15:12:35 -05:00
parent 66ab8a384a
commit 4f00300d9c
No known key found for this signature in database
3 changed files with 5 additions and 5 deletions

2
Cargo.lock generated
View file

@ -22,7 +22,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]] [[package]]
name = "commit-helper" name = "commit-helper"
version = "0.1.0" version = "0.1.1"
dependencies = [ dependencies = [
"inquire", "inquire",
] ]

View file

@ -1,6 +1,6 @@
[package] [package]
name = "commit-helper" name = "commit-helper"
version = "0.1.0" version = "0.1.1"
edition = "2021" edition = "2021"
[[bin]] [[bin]]

View file

@ -14,7 +14,7 @@ fn main() {
// Commit Type // Commit Type
let commit_type_options = vec![ let commit_type_options = vec![
"build", "ci", "docs", "feat", "fix", "perf", "refactor", "test", "build", "ci", "chore", "docs", "feat", "fix", "perf", "refactor", "test",
]; ];
let commit_type = Select::new("Type:", commit_type_options).prompt(); let commit_type = Select::new("Type:", commit_type_options).prompt();
let commit_type = match commit_type { let commit_type = match commit_type {
@ -43,7 +43,7 @@ fn main() {
match confirm { match confirm {
Ok(true) => { Ok(true) => {
if run_git_add { if run_git_add == true {
println!("Running git add -A"); println!("Running git add -A");
if !dry_run { if !dry_run {
Command::new("git") Command::new("git")
@ -54,7 +54,7 @@ fn main() {
} }
println!("Running git commit -m \"{}\"", result_message); println!("Running git commit -m \"{}\"", result_message);
if !dry_run { if dry_run == false {
Command::new("git") Command::new("git")
.args(["commit", "-m", result_message.as_str()]) .args(["commit", "-m", result_message.as_str()])
.output() .output()