Files
gastown/Makefile
Erik LaBianca b333bf8146 fix(install): Makefile uses go install to match docs (#851)
* fix(install): use go install to match docs

Makefile install target now uses 'go install' instead of cp to
~/.local/bin, aligning with documented installation method and
GOPATH/GOBIN conventions.

Closes: hq-93c
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(beads): set BEADS_DIR for config

* test(config,rig): update startup and bd stubs

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:12:38 -08:00

33 lines
920 B
Makefile

.PHONY: build install clean test generate
BINARY := gt
BUILD_DIR := .
# Get version info for ldflags
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
BUILD_TIME := $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
LDFLAGS := -X github.com/steveyegge/gastown/internal/cmd.Version=$(VERSION) \
-X github.com/steveyegge/gastown/internal/cmd.Commit=$(COMMIT) \
-X github.com/steveyegge/gastown/internal/cmd.BuildTime=$(BUILD_TIME)
generate:
go generate ./...
build: generate
go build -ldflags "$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY) ./cmd/gt
ifeq ($(shell uname),Darwin)
@codesign -s - -f $(BUILD_DIR)/$(BINARY) 2>/dev/null || true
@echo "Signed $(BINARY) for macOS"
endif
install: generate
go install -ldflags "$(LDFLAGS)" ./cmd/gt
clean:
rm -f $(BUILD_DIR)/$(BINARY)
test:
go test ./...