Skip to content

Commit dae165e

Browse files
committed
release: 0.4.6
2 parents 76548ba + 4f72ad0 commit dae165e

File tree

8 files changed

+53
-98
lines changed

8 files changed

+53
-98
lines changed

.github/workflows/msrv.yaml

Lines changed: 0 additions & 54 deletions
This file was deleted.

CREDITS.md

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,50 @@
11
# Project Dependencies
22
Package: cargo-bashman
3-
Version: 0.4.5
4-
Generated: 2024-02-08 19:39:10 UTC
3+
Version: 0.4.6
4+
Generated: 2024-02-28 01:59:04 UTC
55

66
| Package | Version | Author(s) | License |
77
| ---- | ---- | ---- | ---- |
8-
| [adbyss_psl](https://github.com/Blobfolio/adbyss) | 0.9.5 | [Josh Stoik](mailto:[email protected]) | WTFPL |
9-
| [ahash](https://github.com/tkaitchuck/ahash) | 0.8.7 | [Tom Kaitchuck](mailto:[email protected]) | Apache-2.0 or MIT |
10-
| [argyle](https://github.com/Blobfolio/argyle) | 0.7.1 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
11-
| [bashman_core](https://github.com/Blobfolio/bashman) | 0.4.5 | [Josh Stoik](mailto:[email protected]) | WTFPL |
8+
| [adbyss_psl](https://github.com/Blobfolio/adbyss) | 0.10.0 | [Josh Stoik](mailto:[email protected]) | WTFPL |
9+
| [adler](https://github.com/jonas-schievink/adler.git) | 1.0.2 | [Jonas Schievink](mailto:[email protected]) | 0BSD, Apache-2.0, or MIT |
10+
| [ahash](https://github.com/tkaitchuck/ahash) | 0.8.10 | [Tom Kaitchuck](mailto:[email protected]) | Apache-2.0 or MIT |
11+
| [argyle](https://github.com/Blobfolio/argyle) | 0.7.2 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
12+
| [bashman_core](https://github.com/Blobfolio/bashman) | 0.4.6 | [Josh Stoik](mailto:[email protected]) | WTFPL |
1213
| [camino](https://github.com/camino-rs/camino) | 1.1.6 | [Without Boats](mailto:[email protected]), [Ashley Williams](mailto:[email protected]), [Steve Klabnik](mailto:[email protected]), and [Rain](mailto:[email protected]) | Apache-2.0 or MIT |
13-
| [cargo-platform](https://github.com/rust-lang/cargo) | 0.1.6 | | Apache-2.0 or MIT |
14+
| [cargo-platform](https://github.com/rust-lang/cargo) | 0.1.7 | | Apache-2.0 or MIT |
1415
| [cargo_metadata](https://github.com/oli-obk/cargo_metadata) | 0.18.1 | [Oliver Schneider](mailto:[email protected]) | MIT |
1516
| [cfg-if](https://github.com/alexcrichton/cfg-if) | 1.0.0 | [Alex Crichton](mailto:[email protected]) | Apache-2.0 or MIT |
17+
| [crc32fast](https://github.com/srijs/rust-crc32fast) | 1.4.0 | [Sam Rijs](mailto:[email protected]) and [Alex Crichton](mailto:[email protected]) | Apache-2.0 or MIT |
1618
| [dactyl](https://github.com/Blobfolio/dactyl) | 0.7.0 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
1719
| [equivalent](https://github.com/cuviper/equivalent) | 1.0.1 | | Apache-2.0 or MIT |
18-
| [fyi_msg](https://github.com/Blobfolio/fyi) | 0.12.0 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
20+
| [flate2](https://github.com/rust-lang/flate2-rs) | 1.0.28 | [Alex Crichton](mailto:[email protected]) and [Josh Triplett](mailto:[email protected]) | Apache-2.0 or MIT |
21+
| [fyi_msg](https://github.com/Blobfolio/fyi) | 0.13.1 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
1922
| [hashbrown](https://github.com/rust-lang/hashbrown) | 0.14.3 | [Amanieu d'Antras](mailto:[email protected]) | Apache-2.0 or MIT |
20-
| [indexmap](https://github.com/indexmap-rs/indexmap) | 2.2.2 | | Apache-2.0 or MIT |
23+
| [indexmap](https://github.com/indexmap-rs/indexmap) | 2.2.3 | | Apache-2.0 or MIT |
2124
| [itoa](https://github.com/dtolnay/itoa) | 1.0.10 | [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
22-
| [libdeflate-sys](https://github.com/adamkewley/libdeflater) | 1.19.0 | [Adam Kewley](mailto:[email protected]) | Apache-2.0 |
23-
| [libdeflater](https://github.com/adamkewley/libdeflater) | 1.19.0 | [Adam Kewley](mailto:[email protected]) | Apache-2.0 |
2425
| [memchr](https://github.com/BurntSushi/memchr) | 2.7.1 | [Andrew Gallant](mailto:[email protected]) and bluss | MIT or Unlicense |
26+
| [miniz_oxide](https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide) | 0.7.2 | [Frommi](mailto:[email protected]) and [oyvindln](mailto:[email protected]) | Apache-2.0, MIT, or Zlib |
2527
| [oxford_join](https://github.com/Blobfolio/oxford_join) | 0.2.9 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
2628
| [proc-macro2](https://github.com/dtolnay/proc-macro2) | 1.0.78 | [David Tolnay](mailto:[email protected]) and [Alex Crichton](mailto:[email protected]) | Apache-2.0 or MIT |
2729
| [quote](https://github.com/dtolnay/quote) | 1.0.35 | [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
28-
| [ryu](https://github.com/dtolnay/ryu) | 1.0.16 | [David Tolnay](mailto:[email protected]) | Apache-2.0 or BSL-1.0 |
29-
| [semver](https://github.com/dtolnay/semver) | 1.0.21 | [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
30-
| [serde](https://github.com/serde-rs/serde) | 1.0.196 | [Erick Tryzelaar](mailto:[email protected]) and [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
31-
| [serde_derive](https://github.com/serde-rs/serde) | 1.0.196 | [Erick Tryzelaar](mailto:[email protected]) and [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
32-
| [serde_json](https://github.com/serde-rs/json) | 1.0.113 | [Erick Tryzelaar](mailto:[email protected]) and [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
30+
| [ryu](https://github.com/dtolnay/ryu) | 1.0.17 | [David Tolnay](mailto:[email protected]) | Apache-2.0 or BSL-1.0 |
31+
| [semver](https://github.com/dtolnay/semver) | 1.0.22 | [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
32+
| [serde](https://github.com/serde-rs/serde) | 1.0.197 | [Erick Tryzelaar](mailto:[email protected]) and [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
33+
| [serde_derive](https://github.com/serde-rs/serde) | 1.0.197 | [Erick Tryzelaar](mailto:[email protected]) and [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
34+
| [serde_json](https://github.com/serde-rs/json) | 1.0.114 | [Erick Tryzelaar](mailto:[email protected]) and [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
3335
| [serde_spanned](https://github.com/toml-rs/toml) | 0.6.5 | | Apache-2.0 or MIT |
34-
| [syn](https://github.com/dtolnay/syn) | 2.0.48 | [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
35-
| [thiserror](https://github.com/dtolnay/thiserror) | 1.0.56 | [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
36-
| [thiserror-impl](https://github.com/dtolnay/thiserror) | 1.0.56 | [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
36+
| [syn](https://github.com/dtolnay/syn) | 2.0.51 | [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
37+
| [thiserror](https://github.com/dtolnay/thiserror) | 1.0.57 | [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
38+
| [thiserror-impl](https://github.com/dtolnay/thiserror) | 1.0.57 | [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
3739
| [tinyvec](https://github.com/Lokathor/tinyvec) | 1.6.0 | [Lokathor](mailto:[email protected]) | Apache-2.0, MIT, or Zlib |
3840
| [tinyvec_macros](https://github.com/Soveu/tinyvec_macros) | 0.1.1 | [Soveu](mailto:[email protected]) | Apache-2.0, MIT, or Zlib |
3941
| [toml](https://github.com/toml-rs/toml) | 0.8.10 | [Alex Crichton](mailto:[email protected]) | Apache-2.0 or MIT |
4042
| [toml_datetime](https://github.com/toml-rs/toml) | 0.6.5 | [Alex Crichton](mailto:[email protected]) | Apache-2.0 or MIT |
41-
| [toml_edit](https://github.com/toml-rs/toml) | 0.22.4 | [Andronik Ordian](mailto:[email protected]) and [Ed Page](mailto:[email protected]) | Apache-2.0 or MIT |
43+
| [toml_edit](https://github.com/toml-rs/toml) | 0.22.6 | [Andronik Ordian](mailto:[email protected]) and [Ed Page](mailto:[email protected]) | Apache-2.0 or MIT |
4244
| [trimothy](https://github.com/Blobfolio/trimothy) | 0.2.2 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
4345
| [unicode-bidi](https://github.com/servo/unicode-bidi) | 0.3.15 | The Servo Project Developers | Apache-2.0 or MIT |
4446
| [unicode-ident](https://github.com/dtolnay/unicode-ident) | 1.0.12 | [David Tolnay](mailto:[email protected]) | Apache-2.0 AND Unicode-DFS-2016 or MIT |
45-
| [unicode-normalization](https://github.com/unicode-rs/unicode-normalization) | 0.1.22 | [kwantam](mailto:[email protected]) and [Manish Goregaokar](mailto:[email protected]) | Apache-2.0 or MIT |
47+
| [unicode-normalization](https://github.com/unicode-rs/unicode-normalization) | 0.1.23 | [kwantam](mailto:[email protected]) and [Manish Goregaokar](mailto:[email protected]) | Apache-2.0 or MIT |
4648
| [utc2k](https://github.com/Blobfolio/utc2k) | 0.8.0 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
47-
| [winnow](https://github.com/winnow-rs/winnow) | 0.5.39 | | MIT |
49+
| [winnow](https://github.com/winnow-rs/winnow) | 0.6.2 | | MIT |
4850
| [zerocopy](https://github.com/google/zerocopy) | 0.7.32 | [Joshua Liebow-Feeser](mailto:[email protected]) | Apache-2.0, BSD-2-Clause, or MIT |

bashman/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
[package]
22
name = "cargo-bashman"
3-
version = "0.4.5"
3+
version = "0.4.6"
44
license = "WTFPL"
55
authors = ["Josh Stoik <[email protected]>"]
66
edition = "2021"
7-
rust-version = "1.70"
87
description = "A Cargo plugin to generate BASH completions and MAN pages."
98
repository = "https://github.com/Blobfolio/bashman"
109
publish = false
@@ -66,8 +65,8 @@ label = "<Cargo.toml>"
6665
path = true
6766

6867
[dependencies]
69-
argyle = "0.7.*"
70-
fyi_msg = "0.12.*"
68+
argyle = "0.7.2"
69+
fyi_msg = "0.13.*"
7170

7271
[dependencies.bashman_core]
7372
path = "../bashman_core"

bashman/src/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ fn _main() -> Result<(), BashManError> {
6464
// Parse CLI arguments.
6565
let args = Argue::new(FLAG_HELP | FLAG_VERSION).map_err(BashManError::Argue)?;
6666

67+
// Check for invalid CLI options.
68+
if let Some(boo) = args.check_keys(
69+
&[b"--no-bash", b"--no-credits", b"--no-man"],
70+
&[b"--features", b"--manifest-path", b"-f", b"-m"],
71+
) {
72+
return Err(BashManError::InvalidCli(String::from_utf8_lossy(boo).into()));
73+
}
74+
6775
let mut flags: u8 = FLAG_ALL;
6876
if args.switch(b"--no-bash") {
6977
flags &= ! FLAG_BASH;

bashman_core/Cargo.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
[package]
22
name = "bashman_core"
3-
version = "0.4.5"
3+
version = "0.4.6"
44
license = "WTFPL"
55
authors = ["Josh Stoik <[email protected]>"]
66
edition = "2021"
7-
rust-version = "1.70"
87
description = "The backing library for Cargo Bashman."
98
repository = "https://github.com/Blobfolio/bashman"
109
publish = false
1110

1211
[dependencies]
13-
adbyss_psl = "0.9.*"
14-
argyle = "0.7.*"
12+
adbyss_psl = "0.10.*"
13+
argyle = "0.7.2"
1514
cargo_metadata = "=0.18.1"
16-
fyi_msg = "0.12.*"
15+
flate2 = "=1.0.28"
16+
fyi_msg = "0.13.*"
1717
indexmap = "2.2.*"
18-
libdeflater = "=1.19.0"
1918
oxford_join = "0.2.*"
2019
trimothy = "0.2.*"
2120
utc2k = "0.8.*"

bashman_core/src/data.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ This module contains the [`Command`] and related data structures produced from
77

88
use crate::BashManError;
99
use fyi_msg::Msg;
10-
use libdeflater::{
11-
CompressionLvl,
12-
Compressor,
10+
use flate2::{
11+
Compression,
12+
write::GzEncoder,
1313
};
1414
use std::{
1515
fs::File,
@@ -359,14 +359,12 @@ impl<'a> Command<'a> {
359359
.and_then(|mut f| f.write_all(data).and_then(|()| f.flush()))
360360
.map_err(|_| BashManError::WriteSubMan(Box::from(self.bin)))?;
361361

362-
// Write compressed.
363-
let mut writer = Compressor::new(CompressionLvl::best());
364-
let mut buf: Vec<u8> = vec![0; writer.gzip_compress_bound(data.len())];
365-
366-
// Trim any excess now that we know the final length.
367-
let len = writer.gzip_compress(data, &mut buf)
362+
// Gzip it.
363+
let mut writer = GzEncoder::new(Vec::new(), Compression::best());
364+
let buf = writer.write_all(data)
365+
.and_then(|()| writer.flush())
366+
.and_then(|()| writer.finish())
368367
.map_err(|_| BashManError::WriteSubMan(Box::from(self.bin)))?;
369-
buf.truncate(len);
370368

371369
// Toss ".gz" onto the original file path and write again!
372370
let mut dst = path.to_path_buf();

bashman_core/src/error.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ pub enum BashManError {
1717
InvalidBashDir,
1818
/// # Invalid Credits output directory.
1919
InvalidCreditsDir,
20+
/// # Invalid CLI Option.
21+
InvalidCli(Box<str>),
2022
/// # Invalid flag.
2123
InvalidFlag,
2224
/// # Invalid item.
@@ -52,6 +54,7 @@ impl fmt::Display for BashManError {
5254
match self {
5355
Self::Argue(src) => f.write_str(src.as_str()),
5456
Self::InvalidBashDir => f.write_str("Invalid BASH output directory."),
57+
Self::InvalidCli(s) => f.write_fmt(format_args!("Invalid/unknown CLI option: {s}")),
5558
Self::InvalidCreditsDir => f.write_str("Invalid credits output directory."),
5659
Self::InvalidFlag => f.write_str("Flags require at least one short/long key."),
5760
Self::InvalidItem => f.write_str("Items require a key and value."),

release/man/cargo-bashman.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.TH "CARGO BASHMAN" "1" "February 2024" "Cargo BashMan v0.4.5" "User Commands"
1+
.TH "CARGO BASHMAN" "1" "February 2024" "Cargo BashMan v0.4.6" "User Commands"
22
.SH NAME
3-
Cargo BashMan \- Manual page for cargo\-bashman v0.4.5.
3+
Cargo BashMan \- Manual page for cargo\-bashman v0.4.6.
44
.SH DESCRIPTION
55
A Cargo plugin to generate BASH completions and MAN pages.
66
.SS USAGE:

0 commit comments

Comments
 (0)