chore: bump v0.1.0, housekeeping #8

Merged
cafkafk merged 8 commits from dev into main 2023-07-03 11:49:50 +02:00
5 changed files with 33 additions and 25 deletions
Showing only changes of commit 97d8ee52fc - Show all commits

View file

@ -1,3 +1,2 @@
#!/usr/bin/env bash #!/usr/bin/env bash
cargo rustc --release -- -C target-cpu=native
cargo install --path . cargo install --path .

View file

@ -7,6 +7,7 @@
- [ ] libgit2 (maybe) - [ ] libgit2 (maybe)
- [ ] Category Flags Finished - [ ] Category Flags Finished
- [ ] Implement Quiet flag - [ ] Implement Quiet flag
- [ ] Implement no-emoji flag
* 0.1.0 [80%] [4/5] * 0.1.0 [80%] [4/5]
- [X] No functionality regressions - [X] No functionality regressions
- [X] commit works in quick, fast - [X] commit works in quick, fast
@ -16,6 +17,6 @@
- [X] Subcommands - [X] Subcommands
- [X] Quiet flag (wont rn) - [X] Quiet flag (wont rn)
- [X] Do something about coc flag - [X] Do something about coc flag
- [ ] UX - [-] UX
- [ ] Change failure emotes - [X] Change failure emotes
- [ ] Flag for disabling emotes - [ ] Flag for disabling emotes

View file

@ -25,6 +25,8 @@ use std::os::unix::fs::symlink;
use std::path::Path; use std::path::Path;
use std::{fs, process::Command}; use std::{fs, process::Command};
use crate::utils::strings::{FAILURE_EMOJI, SUCCESS_EMOJI};
/// An enum containing flags that change behaviour of repos and categories /// An enum containing flags that change behaviour of repos and categories
#[derive(PartialOrd, Ord, PartialEq, Eq, Serialize, Deserialize, Debug)] #[derive(PartialOrd, Ord, PartialEq, Eq, Serialize, Deserialize, Debug)]
pub enum RepoFlags { pub enum RepoFlags {
@ -349,9 +351,9 @@ impl Config {
for (_, repo) in category.repos.as_ref().expect("failed to get repos").iter() { for (_, repo) in category.repos.as_ref().expect("failed to get repos").iter() {
let mut sp = Spinner::new(Spinners::Dots10, format!("{}: {}", repo.name, op)); let mut sp = Spinner::new(Spinners::Dots10, format!("{}: {}", repo.name, op));
if f(repo) { if f(repo) {
sp.stop_and_persist("", format!("{}: {}", repo.name, op)); sp.stop_and_persist(SUCCESS_EMOJI, format!("{}: {}", repo.name, op));
} else { } else {
sp.stop_and_persist("", format!("{}: {}", repo.name, op)); sp.stop_and_persist(FAILURE_EMOJI, format!("{}: {}", repo.name, op));
} }
} }
} }
@ -405,9 +407,9 @@ impl Config {
let op = instruction.operation; let op = instruction.operation;
let mut sp = Spinner::new(Spinners::Dots10, format!("{}: {}", repo.name, op)); let mut sp = Spinner::new(Spinners::Dots10, format!("{}: {}", repo.name, op));
if f(repo) { if f(repo) {
sp.stop_and_persist("", format!("{}: {}", repo.name, op)); sp.stop_and_persist(SUCCESS_EMOJI, format!("{}: {}", repo.name, op));
} else { } else {
sp.stop_and_persist("", format!("{}: {}", repo.name, op)); sp.stop_and_persist(FAILURE_EMOJI, format!("{}: {}", repo.name, op));
break; break;
} }
} }
@ -451,9 +453,9 @@ impl Config {
let op = instruction.operation; let op = instruction.operation;
let mut sp = Spinner::new(Spinners::Dots10, format!("{}: {}", repo.name, op)); let mut sp = Spinner::new(Spinners::Dots10, format!("{}: {}", repo.name, op));
if f(repo) { if f(repo) {
sp.stop_and_persist("", format!("{}: {}", repo.name, op)); sp.stop_and_persist(SUCCESS_EMOJI, format!("{}: {}", repo.name, op));
} else { } else {
sp.stop_and_persist("", format!("{}: {}", repo.name, op)); sp.stop_and_persist(FAILURE_EMOJI, format!("{}: {}", repo.name, op));
} }
} }
} }

View file

@ -1,4 +1,20 @@
categories: categories:
utils:
repos:
li:
name: li
path: /home/ces/org/src/git/
url: git@github.com:cafkafk/li.git
flags:
- Clone
- Push
gg:
name: gg
path: /home/ces/.dots/
url: git@github.com:cafkafk/gg.git
flags:
- Clone
- Push
empty: {} empty: {}
stuff: stuff:
flags: [] flags: []
@ -11,22 +27,6 @@ categories:
name: gg name: gg
path: /home/ces/.dots/ path: /home/ces/.dots/
url: git@github.com:cafkafk/gg.git url: git@github.com:cafkafk/gg.git
utils:
repos:
gg:
name: gg
path: /home/ces/.dots/
url: git@github.com:cafkafk/gg.git
flags:
- Clone
- Push
li:
name: li
path: /home/ces/org/src/git/
url: git@github.com:cafkafk/li.git
flags:
- Clone
- Push
config: config:
flags: [] flags: []
repos: repos:

View file

@ -59,3 +59,9 @@ pub const QUICK_COMMIT: &str = "git: quick commit";
/// Contains the message for fast commit subcommand /// Contains the message for fast commit subcommand
pub const FAST_COMMIT: &str = "git: fast commit"; pub const FAST_COMMIT: &str = "git: fast commit";
/// Success emoji
pub const SUCCESS_EMOJI: &str = "";
/// Failure emoji
pub const FAILURE_EMOJI: &str = "";