Skip to content

Commit

Permalink
chore(release): Release scryptenc-cli version 0.7.13
Browse files Browse the repository at this point in the history
  • Loading branch information
sorairolake committed Aug 4, 2024
2 parents e2796a4 + 4571238 commit 0966714
Show file tree
Hide file tree
Showing 23 changed files with 163 additions and 90 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
targets: ${{ matrix.target }}
- name: Install cross
if: ${{ matrix.use-cross }}
uses: taiki-e/[email protected].12
uses: taiki-e/[email protected].16
with:
tool: cross
- name: Cache build artifacts
Expand Down
88 changes: 60 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repository = "https://github.com/sorairolake/scryptenc-rs"

[workspace.dependencies]
anyhow = "1.0.86"
clap = { version = "4.5.11", features = ["derive"] }
clap = { version = "4.5.13", features = ["derive"] }
dialoguer = { version = "0.11.0", default-features = false, features = ["password"] }

[profile.release.package.scryptenc-cli]
Expand Down
7 changes: 7 additions & 0 deletions crates/cli/CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ All notable changes to this project will be documented in this file.
The format is based on https://keepachangelog.com/[Keep a Changelog], and this
project adheres to https://semver.org/[Semantic Versioning].

== {compare-url}/scryptenc-cli-v0.7.12\...scryptenc-cli-v0.7.13[0.7.13] - 2024-08-04

=== Changed

* Change `--passphrase-from-env` to take an UTF-8 string as an environment
variable key ({pull-request-url}/407[#407])

== {compare-url}/scryptenc-cli-v0.7.11\...scryptenc-cli-v0.7.12[0.7.12] - 2024-04-17

=== Changed
Expand Down
8 changes: 4 additions & 4 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[package]
name = "scryptenc-cli"
version = "0.7.12"
version = "0.7.13"
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
Expand All @@ -27,17 +27,17 @@ path = "src/main.rs"
anyhow.workspace = true
byte-unit = "5.1.4"
clap = { workspace = true, features = ["wrap_help"] }
clap_complete = "4.5.11"
clap_complete = "4.5.12"
clap_complete_nushell = "4.5.3"
dialoguer.workspace = true
fraction = { version = "0.15.3", default-features = false }
humantime = "2.1.0"
once_cell = "1.19.0"
scryptenc = { version = "0.9.8", path = "../scryptenc" }
serde = { version = "1.0.204", features = ["derive"], optional = true }
serde_json = { version = "1.0.121", optional = true }
serde_json = { version = "1.0.122", optional = true }
sysexits = "0.8.1"
sysinfo = "0.30.13"
sysinfo = "0.31.2"
thiserror = "1.0.63"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Output:

### Generate shell completion

`--generate-completion` option generates shell completions to stdout.
`--generate-completion` option generates shell completions to standard output.

The following shells are supported:

Expand Down
5 changes: 3 additions & 2 deletions crates/cli/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ use crate::{
input, output, params, passphrase,
};

/// Ensures that there are no conflicts if reading the passphrase from stdin.
/// Ensures that there are no conflicts if reading the passphrase from standard
/// input.
fn ensure_stdin_does_not_conflict(path: &Path) -> anyhow::Result<()> {
if path == Path::new("-") {
bail!("cannot read both passphrase and input data from stdin");
bail!("cannot read both passphrase and input data from standard input");
}
Ok(())
}
Expand Down
25 changes: 13 additions & 12 deletions crates/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

use std::{
ffi::OsString,
fmt,
io::{self, Write},
ops::Deref,
Expand Down Expand Up @@ -40,7 +39,7 @@ const ENC_AFTER_LONG_HELP: &str = "See `rscrypt-enc(1)` for more details.";
const DEC_AFTER_LONG_HELP: &str = "See `rscrypt-dec(1)` for more details.";

const INFO_AFTER_LONG_HELP: &str = concat!(
"The result will be write to stdout.\n",
"The result will be write to standard output.\n",
'\n',
"See `rscrypt-info(1)` for more details."
);
Expand All @@ -60,7 +59,7 @@ const INFO_AFTER_LONG_HELP: &str = concat!(
pub struct Opt {
/// Generate shell completion.
///
/// The completion is output to stdout.
/// The completion is output to standard output.
#[arg(long, value_enum, value_name("SHELL"))]
pub generate_completion: Option<Shell>,

Expand Down Expand Up @@ -166,7 +165,7 @@ pub struct Encrypt {
#[arg(long, group("passphrase"))]
pub passphrase_from_tty: bool,

/// Read the passphrase from stdin.
/// Read the passphrase from standard input.
#[arg(long, group("passphrase"))]
pub passphrase_from_stdin: bool,

Expand All @@ -179,7 +178,7 @@ pub struct Encrypt {
/// Note that storing a passphrase in an environment variable can be a
/// security risk.
#[arg(long, value_name("VAR"), group("passphrase"))]
pub passphrase_from_env: Option<OsString>,
pub passphrase_from_env: Option<String>,

/// Read the passphrase from the file.
///
Expand All @@ -198,13 +197,14 @@ pub struct Encrypt {

/// Input file.
///
/// If "-" is specified, data will be read from stdin.
/// If "-" is specified, data will be read from standard input.
#[arg(value_name("INFILE"), value_hint(ValueHint::FilePath))]
pub input: PathBuf,

/// Output file.
///
/// If [OUTFILE] is not specified, the result will be write to stdout.
/// If [OUTFILE] is not specified, the result will be write to standard
/// output.
#[arg(value_name("OUTFILE"), value_hint(ValueHint::FilePath))]
pub output: Option<PathBuf>,
}
Expand Down Expand Up @@ -253,7 +253,7 @@ pub struct Decrypt {
#[arg(long, group("passphrase"))]
pub passphrase_from_tty: bool,

/// Read the passphrase from stdin.
/// Read the passphrase from standard input.
#[arg(long, group("passphrase"))]
pub passphrase_from_stdin: bool,

Expand All @@ -262,7 +262,7 @@ pub struct Decrypt {
/// Note that storing a passphrase in an environment variable can be a
/// security risk.
#[arg(long, value_name("VAR"), group("passphrase"))]
pub passphrase_from_env: Option<OsString>,
pub passphrase_from_env: Option<String>,

/// Read the passphrase from the file.
///
Expand All @@ -281,13 +281,14 @@ pub struct Decrypt {

/// Input file.
///
/// If "-" is specified, data will be read from stdin.
/// If "-" is specified, data will be read from standard input.
#[arg(value_name("INFILE"), value_hint(ValueHint::FilePath))]
pub input: PathBuf,

/// Output file.
///
/// If [OUTFILE] is not specified, the result will be write to stdout.
/// If [OUTFILE] is not specified, the result will be write to standard
/// output.
#[arg(value_name("OUTFILE"), value_hint(ValueHint::FilePath))]
pub output: Option<PathBuf>,
}
Expand All @@ -301,7 +302,7 @@ pub struct Information {

/// Input file.
///
/// If "-" is specified, data will be read from stdin.
/// If "-" is specified, data will be read from standard input.
#[arg(value_name("FILE"), value_hint(ValueHint::FilePath))]
pub input: PathBuf,
}
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub fn read(path: &Path) -> anyhow::Result<Vec<u8>> {
let mut buf = Vec::new();
io::stdin()
.read_to_end(&mut buf)
.context("could not read data from stdin")?;
.context("could not read data from standard input")?;
Ok(buf)
} else {
fs::read(path).with_context(|| format!("could not read data from {}", path.display()))
Expand Down
Loading

0 comments on commit 0966714

Please sign in to comment.