Skip to content

Commit 104df3b

Browse files
committed
Update Homebrew formula to include main version in build flags
- Enhanced the formula generation in the GitHub Actions workflow to pass the main version as a build flag during the installation process. - Ensured accurate versioning for both mcpproxy and main components in the built binary.
1 parent f5f1f29 commit 104df3b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
GOARCH: ${{ matrix.goarch }}
6969
run: |
7070
VERSION=${GITHUB_REF#refs/tags/}
71-
LDFLAGS="-s -w -X mcpproxy-go/cmd/mcpproxy.version=${VERSION}"
71+
LDFLAGS="-s -w -X mcpproxy-go/cmd/mcpproxy.version=${VERSION} -X main.version=${VERSION}"
7272
7373
# Determine clean binary name
7474
if [ "${{ matrix.goos }}" = "windows" ]; then
@@ -241,7 +241,7 @@ jobs:
241241
mkdir -p Formula
242242
243243
# Create formula file
244-
printf 'class Mcpproxy < Formula\n desc "Smart MCP Proxy - Intelligent tool discovery and proxying for Model Context Protocol servers"\n homepage "https://github.com/smart-mcp-proxy/mcpproxy-go"\n url "https://github.com/smart-mcp-proxy/mcpproxy-go/archive/refs/tags/v%s.tar.gz"\n sha256 "%s"\n license "MIT"\n head "https://github.com/smart-mcp-proxy/mcpproxy-go.git"\n\n depends_on "go" => :build\n\n def install\n system "go", "build", "-ldflags", "-s -w -X mcpproxy-go/cmd/mcpproxy.version=v%s", "-o", "mcpproxy", "./cmd/mcpproxy"\n bin.install "mcpproxy"\n end\n\n test do\n assert_match version.to_s, shell_output("#{bin}/mcpproxy --version")\n end\nend\n' "${VERSION}" "${SOURCE_SHA}" "${VERSION}" > Formula/mcpproxy.rb
244+
printf 'class Mcpproxy < Formula\n desc "Smart MCP Proxy - Intelligent tool discovery and proxying for Model Context Protocol servers"\n homepage "https://github.com/smart-mcp-proxy/mcpproxy-go"\n url "https://github.com/smart-mcp-proxy/mcpproxy-go/archive/refs/tags/v%s.tar.gz"\n sha256 "%s"\n license "MIT"\n head "https://github.com/smart-mcp-proxy/mcpproxy-go.git"\n\n depends_on "go" => :build\n\n def install\n system "go", "build", "-ldflags", "-s -w -X mcpproxy-go/cmd/mcpproxy.version=v%s -X main.version=v%s", "-o", "mcpproxy", "./cmd/mcpproxy"\n bin.install "mcpproxy"\n end\n\n test do\n assert_match version.to_s, shell_output("#{bin}/mcpproxy --version")\n end\nend\n' "${VERSION}" "${SOURCE_SHA}" "${VERSION}" "${VERSION}" > Formula/mcpproxy.rb
245245
246246
echo "Formula created successfully"
247247
cat Formula/mcpproxy.rb

0 commit comments

Comments
 (0)