Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,4 @@ Icon
Network Trash Folder
Temporary Items
.apdisk

bin/
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ PKG := .
SKILL_NAME := rollbar-cli
SKILL_SOURCE_DIR := .ai/skills/$(SKILL_NAME)
AI_SKILL_DIRS ?= $(HOME)/.codex/skills $(HOME)/.claude/skills $(HOME)/.config/claude/skills $(HOME)/.cursor/skills $(HOME)/.windsurf/skills
CROSS_PLATFORMS := darwin/amd64 darwin/arm64 linux/amd64 linux/arm64 windows/amd64 windows/arm64

.PHONY: all build install install-skill test test-cover clean help
.PHONY: all build build-cross install install-skill test test-cover clean help

all: build

help:
@echo "Targets:"
@echo " make build Build $(BINARY) into $(BUILD_DIR)/"
@echo " make build-cross Build common cross-platform binaries into $(BUILD_DIR)/"
@echo " make install Install $(BINARY) with 'go install'"
@echo " make install-skill Install .ai skill into common AI tool skill dirs"
@echo " make test Run unit tests"
Expand All @@ -24,6 +26,20 @@ build:
@mkdir -p $(BUILD_DIR)
go build -o $(BUILD_DIR)/$(BINARY) $(PKG)

build-cross:
@mkdir -p $(BUILD_DIR)
@set -e; \
for target in $(CROSS_PLATFORMS); do \
goos=$${target%/*}; \
goarch=$${target#*/}; \
output="$(BUILD_DIR)/$(BINARY)_$${goos}_$${goarch}"; \
if [ "$$goos" = "windows" ]; then \
output="$$output.exe"; \
fi; \
echo "Building $$output"; \
CGO_ENABLED=0 GOOS=$$goos GOARCH=$$goarch go build -trimpath -ldflags="-s -w" -o "$$output" $(PKG); \
done

install: install-skill
go install $(PKG)

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ If you install with `go install` or `make install`, you can run `rollbar-cli ...
# build binary into bin/
make build

# build common macOS, Linux, and Windows binaries into bin/
make build-cross

# install skill into common AI tool skill directories
make install-skill

Expand Down
Loading