Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ jobs:
- name: Build release binary
shell: bash
run: |
cargo deb --profile deb --target ${{ env.TARGET }}
cargo deb --target ${{ env.TARGET }}
version="${{ needs.create-release.outputs.version }}"
echo "DEB_DIR=target/${{ env.TARGET }}/debian" >> $GITHUB_ENV
echo "DEB_NAME=precursor_$version-1_amd64.deb" >> $GITHUB_ENV
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ fn main() {

// Create a clap::ArgMatches object to store the CLI arguments
let cmd = Command::new("precursor")
.version(env!("CARGO_PKG_VERSION"))
.about("Precursor is a PCRE2 payload tagging and similarity hashing CLI (TLSH/LZJD) for text, binary, hex, or base64 input.")
.color(ColorChoice::Auto)
.long_about("Precursor currently supports the following TLSH algorithms:\n
Expand Down
7 changes: 7 additions & 0 deletions tests/cli_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ fn single_packet_emits_protocol_fields() {
.unwrap_or(false));
}

#[test]
fn version_flag_emits_package_version() {
let output = run_precursor(&["--version"], "");
let stdout = String::from_utf8_lossy(&output.stdout);
assert!(stdout.contains(env!("CARGO_PKG_VERSION")));
}

#[test]
fn protocol_hints_include_inference_context() {
let line_one =
Expand Down