|
1 | 1 | # typed: false |
2 | 2 | # frozen_string_literal: true |
3 | 3 |
|
4 | | -# This formula is auto-generated by GoReleaser. |
5 | | -# Manual edits will be overwritten on the next release. |
6 | | -# |
7 | | -# To use this formula before it's published to the tap: |
8 | | -# brew install --build-from-source ./Formula/agentx.rb |
9 | | -# |
10 | | -# After publishing, users can install via: |
11 | | -# brew tap agentsdance/agentx |
12 | | -# brew install agentx |
13 | | - |
14 | 4 | class Agentx < Formula |
15 | 5 | desc "CLI tool for managing MCP servers and skills across AI coding agents" |
16 | 6 | homepage "https://github.com/agentsdance/agentx" |
| 7 | + url "https://github.com/agentsdance/agentx/archive/refs/tags/v0.0.5.tar.gz" |
| 8 | + sha256 "387afada91e1dda9700baafd9b0926b0b4617138350a5a0627b92dec73c0d939" |
17 | 9 | license "Apache-2.0" |
18 | | - version "0.0.7" |
19 | | - |
20 | | - on_macos do |
21 | | - on_intel do |
22 | | - url "https://github.com/agentsdance/agentx/releases/download/v#{version}/agentx_#{version}_darwin_amd64.tar.gz" |
23 | | - sha256 "6b7181fab5420bd6675e042cf5db5ba02809099fe49057bd1e1cae79c9e8de21" |
24 | | - end |
25 | | - |
26 | | - on_arm do |
27 | | - url "https://github.com/agentsdance/agentx/releases/download/v#{version}/agentx_#{version}_darwin_arm64.tar.gz" |
28 | | - sha256 "e5ca1aed035684a8c6d672399718418b350f433ba2a72766bd781df99252e6ee" |
29 | | - end |
30 | | - end |
| 10 | + head "https://github.com/agentsdance/agentx.git", branch: "master" |
31 | 11 |
|
32 | | - on_linux do |
33 | | - on_intel do |
34 | | - url "https://github.com/agentsdance/agentx/releases/download/v#{version}/agentx_#{version}_linux_amd64.tar.gz" |
35 | | - sha256 "19038bde1de5a4bc761c810762d0cdecdadbe85a21799896280951c24e2844a1" |
36 | | - end |
37 | | - |
38 | | - on_arm do |
39 | | - url "https://github.com/agentsdance/agentx/releases/download/v#{version}/agentx_#{version}_linux_arm64.tar.gz" |
40 | | - sha256 "3f2da0a3b3e6880f4af2dbbab07d1fc88998c1bf8cf387d12e9928398d7568e4" |
41 | | - end |
42 | | - end |
43 | | - |
44 | | - head do |
45 | | - url "https://github.com/agentsdance/agentx.git", branch: "master" |
46 | | - depends_on "go" => :build |
47 | | - end |
| 12 | + depends_on "go" => :build |
48 | 13 |
|
49 | 14 | def install |
50 | | - if build.head? |
51 | | - system "go", "build", "-ldflags", "-s -w -X github.com/agentsdance/agentx/internal/version.Version=head", "-o", "agentx", "." |
52 | | - end |
53 | | - bin.install "agentx" |
| 15 | + ldflags = %W[ |
| 16 | + -s -w |
| 17 | + -X github.com/agentsdance/agentx/internal/version.Version=#{version} |
| 18 | + ] |
| 19 | + system "go", "build", *std_go_args(ldflags: ldflags) |
54 | 20 | end |
55 | 21 |
|
56 | 22 | test do |
57 | | - system "#{bin}/agentx", "--version" |
| 23 | + assert_match version.to_s, shell_output("#{bin}/agentx version") |
58 | 24 | end |
59 | 25 | end |
0 commit comments