| Crates.io | git_copyright |
| lib.rs | git_copyright |
| version | 0.2.7 |
| created_at | 2022-03-07 07:34:57.533224+00 |
| updated_at | 2022-03-19 17:02:05.245215+00 |
| description | Add/update copyright notes based on git history |
| homepage | |
| repository | https://github.com/sgasse/git-copyright |
| max_upload_size | |
| id | 544881 |
| size | 56,975 |
Extract added/last modified times from git history and add/update copyright notes accordingly.
The easiest way to install git_copyright is via cargo from crates.io:
cargo install git_copyright
If you want to build it from source, clone the repository and then run:
cargo build --release
The only required argument is the name that your copyright should carry, e.g.:
git_copyright --name "MyCompany Ltd."
Additional useful arguments:
--repo: Specify a repo-root other than ./.--config: Pass your own YAML config file with comment signs and glob patterns to ignore.--ignore-changes: Do not exit with an error even if tracked files changed.A full command might look like this:
git_copyright --name "MyCompany Ltd." --repo "../../my_repo" --config "./custom_cfg.yml" --ignore-changes
You can also use a pre-built image:
docker run --rm -u $(id -u) -v $(pwd):/mnt sgasse/git_copyright:v0.2.7 --name "MyCompany Ltd."
When developing, you can set the log environment variable to see debug log output:
RUST_LOG=debug cargo run -- --repo "../../my_repo" --name "MyCompany Ltd."