From 23d9515f416fbec31a2dba78d2322c3186e7f869 Mon Sep 17 00:00:00 2001 From: John Whittington Date: Tue, 6 Dec 2022 10:59:25 +0100 Subject: [PATCH] bump homebrew on macos release --- .github/workflows/build.yml | 16 ++++++++++++++++ ...date.yaml => manual_homebrew_tap_update.yaml} | 8 +------- src/main.rs | 3 ++- 3 files changed, 19 insertions(+), 8 deletions(-) rename .github/workflows/{homebrew_tap_update.yaml => manual_homebrew_tap_update.yaml} (69%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da1fe29e..147e9c29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -149,3 +149,19 @@ jobs: files: ${{ steps.package.outputs.PKG_PATH }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Bump Homebrew formula + uses: mislav/bump-homebrew-formula-action@v2 + if: steps.is-release.outputs.IS_RELEASE && startsWith(matrix.job.os, 'macos') + with: + formula-name: cyme + formula-path: Formula/cyme.rb + homebrew-tap: tuna-f1sh/homebrew-taps + download-url: https://github.com/tuna-f1sh/cyme/releases/download/v${{ env.PROJECT_VERSION}}/${{ steps.package.outputs.PKG_NAME }} + commit-message: | + {{formulaName}} {{version}} + + Created by https://github.com/mislav/bump-homebrew-formula-action + env: + COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }} + diff --git a/.github/workflows/homebrew_tap_update.yaml b/.github/workflows/manual_homebrew_tap_update.yaml similarity index 69% rename from .github/workflows/homebrew_tap_update.yaml rename to .github/workflows/manual_homebrew_tap_update.yaml index d3637360..a328be3f 100644 --- a/.github/workflows/homebrew_tap_update.yaml +++ b/.github/workflows/manual_homebrew_tap_update.yaml @@ -1,6 +1,5 @@ -name: Deploy release to homebrew +name: Manually deploy release to homebrew -# on: [release] on: workflow_dispatch: inputs: @@ -13,10 +12,6 @@ jobs: name: Bump Homebrew formula runs-on: ubuntu-latest steps: - # - name: Extract version - # id: extract-version - # run: | - # printf "::set-output name=%s::%s\n" tag-name "${GITHUB_REF#refs/tags/}" - uses: mislav/bump-homebrew-formula-action@v2 if: "!contains(github.ref, '-')" # skip prereleases with: @@ -24,7 +19,6 @@ jobs: formula-path: Formula/cyme.rb homebrew-tap: tuna-f1sh/homebrew-taps tag-name: ${{ github.event.inputs.tag-name }} - # download-url: https://github.com/tuna-f1sh/cyme/releases/download/${{ steps.extract-version.outputs.tag-name }}/cyme-v${{ steps.extract-version.outputs.tag-name }}-x86_64-apple-darwin.tar.gz download-url: https://github.com/tuna-f1sh/cyme/releases/download/${{ github.event.inputs.tag-name }}/cyme-${{ github.event.inputs.tag-name }}-x86_64-apple-darwin.tar.gz commit-message: | {{formulaName}} {{version}} diff --git a/src/main.rs b/src/main.rs index ac69b7d4..0e1cb14d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -94,7 +94,8 @@ struct Args { #[arg(long, value_enum, default_value_t = Default::default())] group_devices: display::Group, - /// Hide empty buses when printing tree; those with no devices + /// Hide empty buses when printing tree; those with no devices. When listing will hide Linux root_hubs + // these are a bit confusing, could make value enum with hide_empty, hide... #[arg(long, default_value_t = false)] hide_buses: bool,