From 8e170a0c70cf831e3e56354948f71101efb09fb8 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdx@users.noreply.github.com> Date: Wed, 10 Apr 2024 07:42:53 -0500 Subject: [PATCH 1/2] fix(brew): use official homebrew formula Depends on https://github.com/Homebrew/homebrew-core/pull/168459 --- .github/workflows/publish-cli.yml | 5 +++++ docs/cli/index.md | 2 +- lib/src/parse/spec.rs | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-cli.yml b/.github/workflows/publish-cli.yml index a5857ce..ad1e161 100644 --- a/.github/workflows/publish-cli.yml +++ b/.github/workflows/publish-cli.yml @@ -48,6 +48,11 @@ jobs: needs: [publish-cli] continue-on-error: true steps: + - name: Bump Homebrew formula + uses: dawidd6/action-homebrew-bump-formula@v3 + with: + token: ${{ secrets.GH_BOT_TOKEN }} + formula: usage - name: Bump Homebrew formula uses: dawidd6/action-homebrew-bump-formula@v3 with: diff --git a/docs/cli/index.md b/docs/cli/index.md index cdff45a..c926a1f 100644 --- a/docs/cli/index.md +++ b/docs/cli/index.md @@ -23,5 +23,5 @@ cargo binstall usage-cli ### Homebrew ```sh -brew install jdx/tap/usage +brew install usage ``` diff --git a/lib/src/parse/spec.rs b/lib/src/parse/spec.rs index 1e34ea9..b9df402 100644 --- a/lib/src/parse/spec.rs +++ b/lib/src/parse/spec.rs @@ -133,7 +133,7 @@ impl Spec { fn split_script(file: &Path) -> Result<(String, String), UsageErr> { let full = file::read_to_string(file)?; let schema = full.strip_prefix("#!/usr/bin/env usage\n").unwrap_or(&full); - let (schema, body) = schema.split_once("\n#!").unwrap_or((&schema, "")); + let (schema, body) = schema.split_once("\n#!").unwrap_or((schema, "")); let schema = schema.trim().to_string(); let body = format!("#!{}", body); Ok((schema, body)) From 17a38037509ae45481382927bdd935c44ee279c6 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdx@users.noreply.github.com> Date: Wed, 10 Apr 2024 07:47:20 -0500 Subject: [PATCH 2/2] test(mega-linter): ignore clippy --- .markdownlintignore | 1 + .mega-linter.yml | 1 + 2 files changed, 2 insertions(+) create mode 100644 .markdownlintignore diff --git a/.markdownlintignore b/.markdownlintignore new file mode 100644 index 0000000..1b763b1 --- /dev/null +++ b/.markdownlintignore @@ -0,0 +1 @@ +CHANGELOG.md diff --git a/.mega-linter.yml b/.mega-linter.yml index 4e81948..34e53fe 100644 --- a/.mega-linter.yml +++ b/.mega-linter.yml @@ -23,6 +23,7 @@ DISABLE_LINTERS: - REPOSITORY_DEVSKIM - REPOSITORY_GRYPE - REPOSITORY_KICS + - RUST_CLIPPY # PRE_COMMANDS: # - command: apk add --no-cache zlib-dev zlib-static openssl-dev libffi-dev