-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
21,488 additions
and
632 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "cargo-bashman" | ||
version = "0.6.0" | ||
version = "0.6.1" | ||
license = "WTFPL" | ||
authors = ["Josh Stoik <[email protected]>"] | ||
edition = "2021" | ||
|
@@ -9,7 +9,7 @@ repository = "https://github.com/Blobfolio/bashman" | |
publish = false | ||
|
||
[package.metadata.deb] | ||
maintainer = "Josh Stoik <hello@blobfolio.com>" | ||
maintainer = "Josh Stoik <josh@blobfolio.com>" | ||
copyright = "2024, Blobfolio, LLC <[email protected]>" | ||
license-file = ["./LICENSE", "0"] | ||
revision = "1" | ||
|
@@ -45,6 +45,10 @@ description = "Do not generate CREDITS.md." | |
long = "--no-man" | ||
description = "Do not generate MAN page(s)." | ||
|
||
[[package.metadata.bashman.switches]] | ||
long = "--print-targets" | ||
description = "Print the supported target triples (for use with -t/--target) to STDOUT and exit." | ||
|
||
[[package.metadata.bashman.switches]] | ||
short = "-V" | ||
long = "--version" | ||
|
@@ -57,16 +61,22 @@ description = "Path to the Cargo.toml file to use." | |
label = "<Cargo.toml>" | ||
path = true | ||
|
||
[[package.metadata.bashman.options]] | ||
short = "-t" | ||
long = "--target" | ||
description = "Limit CREDITS.md to dependencies used by the target <TRIPLE>, e.g. x86_64-unknown-linux-gnu. See --print-targets for the supported values." | ||
label = "<TRIPLE>" | ||
|
||
[build-dependencies] | ||
argyle = "0.10.*" | ||
|
||
[dependencies] | ||
argyle = "0.10.*" | ||
adbyss_psl = "0.14.*" | ||
cargo_metadata = "=0.18.1" | ||
dactyl = "0.7.4" | ||
fyi_msg = "1.1.*" | ||
oxford_join = "0.4.*" | ||
serde_json = "1.0.*" | ||
trimothy = "0.3.*" | ||
utc2k = "0.11.*" | ||
write_atomic = "0.5.*" | ||
|
@@ -87,6 +97,10 @@ features = [ "derive" ] | |
version = "0.8.*" | ||
features = [ "preserve_order" ] | ||
|
||
[dependencies.url] | ||
version = "2.5.*" | ||
features = [ "serde" ] | ||
|
||
[profile.release] | ||
lto = true | ||
codegen-units = 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ cargo bashman [-h/--help] | |
|
||
The flags `--no-bash`, `--no-man`, and `--no-credits` can be used to skip the generation of BASH completions, MAN pages, and/or `CREDITS.md` respectively. | ||
|
||
Note that for the `CREDITS.md` feature, [Cargo](https://github.com/rust-lang/cargo) is required. (It pulls the dependency tree from the `cargo metadata` output.) | ||
Note that for the `CREDITS.md` feature, [Cargo](https://github.com/rust-lang/cargo) is explicitly required. (It pulls the dependency tree from the `cargo metadata` output.) | ||
|
||
|
||
## CONFIGURATION | ||
|
@@ -80,6 +80,7 @@ credits-dir = "../" | |
| options | *array* | An array of your app's key=value options, if any. | | | ||
| arguments | *array* | An array of any trailing arguments expected by your app. | | | ||
| sections | *array* | Arbitrary sections to append to the MAN page. | | | ||
| credits | *array* | An array of non-Rust dependencies to add to CREDITS.md. | | | ||
|
||
While `bash-dir`, `man-dir`, and `credits-dir` are required, the actual content generation can be skipped by using the CLI flags `--no-bash`, `--no-man`, and/or `--no-credits` respectively. | ||
|
||
|
@@ -227,6 +228,35 @@ items = [ | |
``` | ||
|
||
|
||
### CREDITS | ||
|
||
To include non-Rust dependencies — i.e. anything `cargo metadata` doesn't know about — in the `CREDITS.md` file generated by `BashMan`, add them to your manifest! | ||
|
||
The fields for `credits` sections have the same formatting requirements as their equivalent Cargo Manifest counterparts. The `name` and `version` parts, in particular, may require a little finessing to make them fit the standard. | ||
|
||
| Key | Type | Description | | ||
| --- | ---- | ----------- | | ||
| name | *string* | ["Package" name](https://doc.rust-lang.org/cargo/reference/manifest.html#the-name-field). | | ||
| version | *string* | [Version](https://doc.rust-lang.org/cargo/reference/manifest.html#the-version-field). | | ||
| license | *string* | [License](https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields). | | ||
| authors | *array* | One or more [authors](https://doc.rust-lang.org/cargo/reference/manifest.html#the-authors-field). | | ||
| repository | *string* | [URL](https://doc.rust-lang.org/cargo/reference/manifest.html#the-repository-field). | | ||
| optional | *bool* | Whether or not the dependency is optional. Default: `false` | | ||
|
||
Both `name` and `version` are required; everything else is optional. | ||
|
||
Example: | ||
```toml | ||
[[package.metadata.bashman.credits]] | ||
name = "lodepng" | ||
version = "2024.10.15" # Altered to meet semver requirement. | ||
license = "Zlib" | ||
authors = [ "Lode Vandevenne" ] # Or w/ email: Jane Doe <[email protected]> | ||
repository = "https://github.com/lvandeve/lodepng" | ||
optional = true | ||
``` | ||
|
||
|
||
### ALL TOGETHER NOW | ||
|
||
Taking `BashMan` as an example, the `Cargo.toml` will end up containing something like: | ||
|
@@ -261,27 +291,3 @@ description = "Path to the Cargo.toml file to use." | |
label = "<Cargo.toml>" | ||
path = true | ||
``` | ||
|
||
|
||
|
||
## License | ||
|
||
See also: [CREDITS.md](CREDITS.md) | ||
|
||
Copyright © 2024 [Blobfolio, LLC](https://blobfolio.com) <[email protected]> | ||
|
||
This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2. | ||
|
||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
Version 2, December 2004 | ||
|
||
Copyright (C) 2004 Sam Hocevar <[email protected]> | ||
|
||
Everyone is permitted to copy and distribute verbatim or modified | ||
copies of this license document, and changing it is allowed as long | ||
as the name is changed. | ||
|
||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
|
||
0. You just DO WHAT THE FUCK YOU WANT TO. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.