diff --git a/.git-hooks/prepare-commit-msg b/.git-hooks/prepare-commit-msg new file mode 100755 index 0000000..e55efe1 --- /dev/null +++ b/.git-hooks/prepare-commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +# cc-cli as a commit hook +exec < /dev/tty +cargo bin cc-cli "$@" diff --git a/.gitignore b/.gitignore index 3ca43ae..ac3080b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,9 @@ debug/ target/ +# cargo-bin-run cache +.bin + # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html Cargo.lock diff --git a/Cargo.toml b/Cargo.toml index d25f581..de25a3e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,3 +6,9 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] + +[dev-dependencies] +cc-cli = "0.1.5" + +[package.metadata.bin] +cc-cli = { version = "0.1" } diff --git a/justfile b/justfile new file mode 100644 index 0000000..ad640d9 --- /dev/null +++ b/justfile @@ -0,0 +1,3 @@ +install-hooks: + @echo "Installing git hooks" + git config core.hooksPath .git-hooks