Skip to content

Commit bed052f

Browse files
committed
Add setup-homebrew target to Makefile for Homebrew tap setup with GitHub Actions
1 parent 77cd301 commit bed052f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: build clean test release version
1+
.PHONY: build clean test release version setup-homebrew
22

33
# Version information
44
VERSION ?= dev
@@ -28,6 +28,17 @@ version:
2828
@echo "Commit: $(COMMIT_SHA)"
2929
@echo "Build Date: $(BUILD_DATE)"
3030

31+
# Setup Homebrew tap (requires GitHub repo access)
32+
setup-homebrew:
33+
@echo "Triggering Homebrew tap setup workflow..."
34+
@curl -X POST \
35+
-H "Accept: application/vnd.github.v3+json" \
36+
-H "Authorization: token $(GITHUB_TOKEN)" \
37+
https://api.github.com/repos/$(GITHUB_USER)/cpw/actions/workflows/setup_tap.yml/dispatches \
38+
-d '{"ref":"main","inputs":{"create_repo":"true"}}'
39+
@echo "\nNote: You need to set GITHUB_TOKEN and GITHUB_USER environment variables."
40+
@echo "Example: GITHUB_TOKEN=ghp_xxx GITHUB_USER=mxvsh make setup-homebrew"
41+
3142
# Create a new release (Usage: make release version=v1.0.0)
3243
release:
3344
@if [ -z "$(version)" ]; then \
@@ -52,4 +63,5 @@ help:
5263
@echo " make test - Run tests"
5364
@echo " make version - Display version information"
5465
@echo " make release version=v1.0.0 - Create and push a new release tag"
66+
@echo " make setup-homebrew - Setup Homebrew tap repository (requires GitHub token)"
5567
@echo " make help - Show this help message"

0 commit comments

Comments
 (0)