8f48dd838b
Replace task statuses (pending/running/succeeded/failed/cancelled) with
a kanban workflow: todo → in_progress → in_review → done/wontdo.
When a non-review agent task completes, the API auto-creates a child
review task and moves the parent to in_review. Only humans can move
tasks from in_review to done/wontdo via the TUI.
New components:
- cmd/tui: bubbletea kanban board with $EDITOR integration
- POST /api/v1/tasks/{id}/complete: agent completion callback
- Operator --api-url flag for completion callbacks
- ProviderQueue sets tasks to in_progress on pickup
- AgentTask reconciler calls /complete on job finish
56 lines
1.6 KiB
Makefile
56 lines
1.6 KiB
Makefile
.PHONY: build test lint fmt generate docker-api docker-operator clean tidy
|
|
|
|
BINARY_API := bin/forgebot-api
|
|
BINARY_OP := bin/forgebot-operator
|
|
BINARY_TUI := bin/forgebot-tui
|
|
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "0.0.0-dev")
|
|
|
|
build: tidy
|
|
go build -ldflags="-s -w" -o $(BINARY_API) ./cmd/api
|
|
go build -ldflags="-s -w" -o $(BINARY_OP) ./cmd/operator
|
|
go build -ldflags="-s -w" -o $(BINARY_TUI) ./cmd/tui
|
|
|
|
test:
|
|
go test -race -count=1 ./pkg/... ./internal/... ./api/...
|
|
|
|
lint:
|
|
go vet ./...
|
|
|
|
fmt:
|
|
gofmt -w .
|
|
|
|
generate:
|
|
controller-gen object paths="./api/..."
|
|
controller-gen crd paths="./api/..." output:crd:artifacts:config=config/crd/bases
|
|
controller-gen rbac:roleName=forgebot-operator paths="./internal/controller/..." output:rbac:dir=config/rbac
|
|
|
|
docker-api:
|
|
docker build -t forgebot-api:$(VERSION) -f Dockerfile.api .
|
|
|
|
docker-operator:
|
|
docker build -t forgebot-operator:$(VERSION) -f Dockerfile.operator .
|
|
|
|
clean:
|
|
rm -rf bin/
|
|
|
|
tidy:
|
|
go mod tidy
|
|
|
|
_LATEST := $(shell git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$$' | head -1)
|
|
_BASE := $(if $(_LATEST),$(_LATEST),v0.0.0)
|
|
_MAJ := $(shell echo $(_BASE) | sed 's/^v//' | cut -d. -f1)
|
|
_MIN := $(shell echo $(_BASE) | sed 's/^v//' | cut -d. -f2)
|
|
_PAT := $(shell echo $(_BASE) | sed 's/^v//' | cut -d. -f3)
|
|
|
|
patch:
|
|
@NEW=v$(_MAJ).$(_MIN).$(shell expr $(_PAT) + 1); \
|
|
git tag $$NEW && echo "Tagged $$NEW" && git push origin $$NEW
|
|
|
|
minor:
|
|
@NEW=v$(_MAJ).$(shell expr $(_MIN) + 1).0; \
|
|
git tag $$NEW && echo "Tagged $$NEW" && git push origin $$NEW
|
|
|
|
major:
|
|
@NEW=v$(shell expr $(_MAJ) + 1).0.0; \
|
|
git tag $$NEW && echo "Tagged $$NEW" && git push origin $$NEW
|