├── README.md ├── Formula └── context-pilot.rb └── .github └── workflows ├── publish.yml └── tests.yml /README.md: -------------------------------------------------------------------------------- 1 | # Context-pilot 2 | 3 | ## How do I install these formulae? 4 | 5 | `brew install krshrimali/context-pilot/context-pilot` 6 | 7 | Or, in a `brew bundle` `Brewfile`: 8 | 9 | ```ruby 10 | tap "krshrimali/context-pilot" 11 | brew "context-pilot" 12 | ``` 13 | 14 | ## Documentation 15 | 16 | `brew help`, `man brew` or check [Homebrew's documentation](https://docs.brew.sh). 17 | -------------------------------------------------------------------------------- /Formula/context-pilot.rb: -------------------------------------------------------------------------------- 1 | class ContextPilot < Formula 2 | desc "Get Context at your code cursor!" 3 | homepage "https://github.com/krshrimali/context-pilot-rs" 4 | url "https://github.com/krshrimali/context-pilot-rs/archive/refs/tags/v0.9.0.tar.gz" 5 | sha256 "6c349e2ef1fb7a140e5b4120cc0c841717efb23375da7cb77d6c4336f53fac46" 6 | license "MIT" 7 | 8 | depends_on "rust" => :build 9 | 10 | def install 11 | system "cargo", "install", *std_cargo_args 12 | end 13 | 14 | test do 15 | system "#{bin}/contextpilot", "--help" 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: brew pr-pull 2 | 3 | on: 4 | pull_request_target: 5 | types: 6 | - labeled 7 | 8 | jobs: 9 | pr-pull: 10 | if: contains(github.event.pull_request.labels.*.name, 'pr-pull') 11 | runs-on: ubuntu-22.04 12 | permissions: 13 | actions: read 14 | checks: read 15 | contents: write 16 | issues: read 17 | pull-requests: write 18 | steps: 19 | - name: Set up Homebrew 20 | uses: Homebrew/actions/setup-homebrew@master 21 | with: 22 | token: ${{ github.token }} 23 | 24 | - name: Set up git 25 | uses: Homebrew/actions/git-user-config@master 26 | 27 | - name: Pull bottles 28 | env: 29 | HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }} 30 | PULL_REQUEST: ${{ github.event.pull_request.number }} 31 | run: brew pr-pull --debug --tap="$GITHUB_REPOSITORY" "$PULL_REQUEST" 32 | 33 | - name: Push commits 34 | uses: Homebrew/actions/git-try-push@master 35 | with: 36 | branch: main 37 | 38 | - name: Delete branch 39 | if: github.event.pull_request.head.repo.fork == false 40 | env: 41 | BRANCH: ${{ github.event.pull_request.head.ref }} 42 | run: git push --delete origin "$BRANCH" 43 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: brew test-bot 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | 9 | jobs: 10 | test-bot: 11 | strategy: 12 | matrix: 13 | os: [ ubuntu-22.04, macos-13, macos-15 ] 14 | runs-on: ${{ matrix.os }} 15 | permissions: 16 | actions: read 17 | checks: read 18 | contents: read 19 | pull-requests: read 20 | steps: 21 | - name: Set up Homebrew 22 | id: set-up-homebrew 23 | uses: Homebrew/actions/setup-homebrew@master 24 | with: 25 | token: ${{ github.token }} 26 | 27 | - name: Cache Homebrew Bundler RubyGems 28 | uses: actions/cache@v4 29 | with: 30 | path: ${{ steps.set-up-homebrew.outputs.gems-path }} 31 | key: ${{ matrix.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }} 32 | restore-keys: ${{ matrix.os }}-rubygems- 33 | 34 | - run: brew test-bot --only-cleanup-before 35 | 36 | - run: brew test-bot --only-setup 37 | 38 | - run: brew test-bot --only-tap-syntax 39 | - run: brew test-bot --only-formulae 40 | if: github.event_name == 'pull_request' 41 | 42 | - name: Upload bottles as artifact 43 | if: always() && github.event_name == 'pull_request' 44 | uses: actions/upload-artifact@v4 45 | with: 46 | name: bottles_${{ matrix.os }} 47 | path: '*.bottle.*' 48 | --------------------------------------------------------------------------------