├── README.md ├── .github └── workflows │ ├── publish.yml │ └── tests.yml └── Formula └── jira-cli.rb /README.md: -------------------------------------------------------------------------------- 1 | ## Homebrew JiraCLI 2 | 3 | Homebrew tap for [ankitpokhrel/jira-cli](https://github.com/ankitpokhrel/jira-cli) 4 | 5 | #### How do I install this formula? 6 | 7 | ```sh 8 | brew tap ankitpokhrel/jira-cli 9 | brew install jira-cli 10 | ``` 11 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: brew pr-pull 2 | on: 3 | pull_request_target: 4 | types: 5 | - labeled 6 | jobs: 7 | pr-pull: 8 | if: contains(github.event.pull_request.labels.*.name, 'pr-pull') 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Set up Homebrew 12 | uses: Homebrew/actions/setup-homebrew@master 13 | 14 | - name: Set up git 15 | uses: Homebrew/actions/git-user-config@master 16 | 17 | - name: Pull bottles 18 | env: 19 | HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }} 20 | PULL_REQUEST: ${{ github.event.pull_request.number }} 21 | run: brew pr-pull --debug --tap="$GITHUB_REPOSITORY" "$PULL_REQUEST" 22 | 23 | - name: Push commits 24 | uses: Homebrew/actions/git-try-push@master 25 | with: 26 | token: ${{ github.token }} 27 | branch: main 28 | 29 | - name: Delete branch 30 | if: github.event.pull_request.head.repo.fork == false 31 | env: 32 | BRANCH: ${{ github.event.pull_request.head.ref }} 33 | run: git push --delete origin "$BRANCH" 34 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: brew test-bot 2 | on: 3 | push: 4 | branches: 5 | - main 6 | pull_request: 7 | jobs: 8 | test-bot: 9 | strategy: 10 | matrix: 11 | os: [macos-latest] 12 | runs-on: ${{ matrix.os }} 13 | steps: 14 | - name: Set up Homebrew 15 | id: set-up-homebrew 16 | uses: Homebrew/actions/setup-homebrew@master 17 | 18 | - name: Cache Homebrew Bundler RubyGems 19 | id: cache 20 | uses: actions/cache@v4 21 | with: 22 | path: ${{ steps.set-up-homebrew.outputs.gems-path }} 23 | key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }} 24 | restore-keys: ${{ runner.os }}-rubygems- 25 | 26 | - name: Install Homebrew Bundler RubyGems 27 | if: steps.cache.outputs.cache-hit != 'true' 28 | run: brew install-bundler-gems 29 | 30 | - run: brew test-bot --only-cleanup-before 31 | 32 | - run: brew test-bot --only-setup 33 | 34 | - run: brew test-bot --only-tap-syntax 35 | 36 | - run: brew test-bot --only-formulae 37 | if: github.event_name == 'pull_request' 38 | 39 | - name: Upload bottles as artifact 40 | if: always() && github.event_name == 'pull_request' 41 | uses: actions/upload-artifact@main 42 | with: 43 | name: bottles 44 | path: '*.bottle.*' 45 | -------------------------------------------------------------------------------- /Formula/jira-cli.rb: -------------------------------------------------------------------------------- 1 | # typed: false 2 | # frozen_string_literal: true 3 | 4 | class JiraCli < Formula 5 | desc "Feature-rich interactive Jira command-line" 6 | homepage "https://github.com/ankitpokhrel/jira-cli" 7 | version "1.7.0" 8 | license "MIT" 9 | 10 | head do 11 | url "https://github.com/ankitpokhrel/jira-cli.git", branch: "main" 12 | depends_on "go" 13 | end 14 | 15 | on_macos do 16 | if Hardware::CPU.intel? 17 | url "https://github.com/ankitpokhrel/jira-cli/releases/download/v1.7.0/jira_1.7.0_macOS_x86_64.tar.gz" 18 | sha256 "c2cb2f6b440522ec73439ec9a10f4a194b78e4c409341d18da3f91dfef59d090" 19 | end 20 | if Hardware::CPU.arm? 21 | url "https://github.com/ankitpokhrel/jira-cli/releases/download/v1.7.0/jira_1.7.0_macOS_arm64.tar.gz" 22 | sha256 "f9c75d1b242a4cbd78fc49c00c9854c3856f1bd421bdf196c567b3bb71ccf527" 23 | end 24 | end 25 | 26 | on_linux do 27 | if Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? 28 | url "https://github.com/ankitpokhrel/jira-cli/releases/download/v1.7.0/jira_1.7.0_linux_armv6.tar.gz" 29 | sha256 "05e17dbf67e74f9919ac27c9f8d185fc916a1b9c01767edf01588f478f3eaf38" 30 | end 31 | if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? 32 | url "https://github.com/ankitpokhrel/jira-cli/releases/download/v1.7.0/jira_1.7.0_linux_arm64.tar.gz" 33 | sha256 "80aa3cc02790892b29e1580a8e49eb49a6550815b362c5ef8c05aea1dee73a95" 34 | end 35 | if Hardware::CPU.intel? && !Hardware::CPU.is_64_bit? 36 | url "https://github.com/ankitpokhrel/jira-cli/releases/download/v1.7.0/jira_1.7.0_linux_i386.tar.gz" 37 | sha256 "e0136f58465a13ca059e87b58d0e97eedb26080c271b743d55ba6aadf43a793f" 38 | end 39 | if Hardware::CPU.intel? && Hardware::CPU.is_64_bit? 40 | url "https://github.com/ankitpokhrel/jira-cli/releases/download/v1.7.0/jira_1.7.0_linux_x86_64.tar.gz" 41 | sha256 "b5e0ba4804f3f11f92c483d9a6ea9ebccec1c735cd2e12b0440cab9d7afd626a" 42 | end 43 | end 44 | 45 | def install 46 | if build.head? 47 | system "make", "install" 48 | bin.install ENV["GOPATH"] + "/bin/jira" 49 | else 50 | bin.install File.exist?("bin/jira") ? "bin/jira" : "jira" 51 | end 52 | generate_completions_from_executable(bin/"jira", "completion", shells: [:bash, :zsh, :fish]) 53 | end 54 | 55 | test do 56 | help_text = shell_output("#{bin}/jira version") 57 | assert_includes help_text, "Version=\"#{version}\"" 58 | end 59 | end 60 | --------------------------------------------------------------------------------