diff --git a/README.md b/README.md index 8bffe03..24b7aae 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,11 @@ git repo storage. ## Installation -Assuming you have `$HOME/bin` in your `$PATH`, you may use the following command to install -`git-remote-k8s`. It must be named `git-remote-k8s` (without the .sh), be executable, and -be in your PATH to work. +First, install Rust. +Now, from within the cloned repo, install git-remote-k8s ```bash -ln -sf $PWD/git-remote-k8s.sh $HOME/bin/git-remote-k8s +cargo install --path . ``` ## Prerequisites diff --git a/src/main.rs b/src/main.rs index 9038a74..bb76408 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,6 +10,7 @@ // * config mode (maybe) // * set the pvc storageclass instead + use std::f32::consts::E; use std::process::ExitCode; use std::time::Duration; @@ -44,6 +45,12 @@ static REMOTE_PATTERN: Lazy = Lazy::new(|| {regex::Regex::new(&for mod test; #[derive(ClapParser, Debug, Clone)] +/// git-remote-k8s +/// +/// This should usually be run by git. You can set git up to use it +/// by running git remote add k k8s://default/ns/repo. +/// +/// see https://git.strudelline.net/cascade/git-remote-k8s for more info struct Config { #[arg( short, @@ -79,9 +86,7 @@ struct Config { /// storageClassName to use for the backing PVC _if it is created_. /// /// this will be used to create a new PVC but if a PVC already - /// exists by the requested name, it will be used. If there is - /// no repo present in the PVC, one will be created on the first - /// run. + /// exists by the requested name, it will be used. storageclass: Option, #[arg(short('s'),long("initial-volume-size"), default_value("1Gi"), env="GIT_REMOTE_K8S_INITIAL_VOLUME_SIZE")]