#![doc = include_str!("../README.md")]

use std::{path::PathBuf, sync::LazyLock};

mod git;


pub fn repo_dir() -> PathBuf {
    REPO_DIR.to_path_buf()
}

static REPO_DIR: LazyLock<PathBuf> = LazyLock::new(|| {
    let current_dir = std::env::var("CARGO_MANIFEST_DIR")
        .expect("CI build should be executed by Cargo");

    let current_dir = PathBuf::from(current_dir);

    git::determine_git_root(&current_dir)
        .expect("Process should be running in a Git repository")
});
