towl 0.3.6

A fast CLI tool to scan codebases for TODO comments and output them in multiple formats
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::process::Command;

fn run_command<const N: usize>(command: &str, args: [&str; N]) -> String {
    let output = Command::new(command)
        .args(args)
        .output()
        .expect("failed to get run command");
    String::from_utf8(output.stdout).expect("invalid command output")
}

fn git_hash() -> String {
    run_command("git", ["rev-parse", "HEAD"])
}

fn main() {
    let hash = git_hash();
    println!("cargo:rustc-env=TOWL_GIT_COMMIT_HASH={hash}");
}