mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
Herdr users run several agents side by side and had to leave it to see which skills need an update or a sync. The panel brings that view, plus install, update, uninstall, audit hand-off and source repository sync, into a Herdr layout node so it survives space switches. Install audits its own shallow clone first, because install --json names a blocked skill without its findings; a block shows them before anything is written. Pull conflicts show both versions side by side, and .metadata.json merges per entry with the same rule as MergeMetadata so installs from both machines are kept. model.js has no Herdr imports, so make test-herdr covers it in make check and CI. Docs gain a learn/with-herdr page with translations and a README highlight, and the context router loads herdr/AGENTS.md with frontend.
170 lines
4.9 KiB
Makefile
170 lines
4.9 KiB
Makefile
.PHONY: help build build-meta build-windows run test test-herdr test-unit test-int test-docker test-docker-online test-redteam test-redteam-signal test-redteam-rules-signal playground playground-down devc devc-up devc-down devc-restart devc-reset devc-status dev-docker dev-docker-down docker-build docker-build-multiarch lint fmt fmt-check docs-check check install clean ui-install ui-build ui-dev build-all verify verify-shell verify-down verify-status verify-reset
|
|
|
|
help:
|
|
@echo "Common tasks:"
|
|
@echo " make build # build binary"
|
|
@echo " make run # run local binary help"
|
|
@echo " make test # unit + integration tests"
|
|
@echo " make test-unit # unit tests only"
|
|
@echo " make test-int # integration tests only"
|
|
@echo " make test-herdr # Herdr panel mod tests (node)"
|
|
@echo " make test-docker # docker offline sandbox (build + unit + integration)"
|
|
@echo " make test-docker-online # docker online install/update tests"
|
|
@echo " make test-redteam # red team supply-chain security tests"
|
|
@echo " make test-redteam-signal # verify red team test fails on intentional mutation"
|
|
@echo " make test-redteam-rules-signal # verify red team test fails when critical builtin rules are disabled"
|
|
@echo " make playground # start playground + enter shell (one step)"
|
|
@echo " make playground-down # stop and remove playground"
|
|
@echo " make devc # start devcontainer + enter shell (one step)"
|
|
@echo " make devc-up # start devcontainer (no shell)"
|
|
@echo " make devc-down # stop devcontainer"
|
|
@echo " make devc-restart # restart devcontainer"
|
|
@echo " make devc-reset # full reset (remove volumes)"
|
|
@echo " make devc-status # show devcontainer status"
|
|
@echo " make verify # host verify env: real AI CLIs, throwaway config"
|
|
@echo " make verify-shell # enter the verify env shell"
|
|
@echo " make verify-down # stop the verify dashboard"
|
|
@echo " make verify-status # show verify env paths and state"
|
|
@echo " make verify-reset # delete the throwaway HOME"
|
|
@echo " make lint # go vet"
|
|
@echo " make fmt # format Go files"
|
|
@echo " make docs-check # validate AI context routes and budgets"
|
|
@echo " make check # fmt-check + lint + test"
|
|
@echo " make ui-dev # Go API server + Vite dev server (requires local Go)"
|
|
@echo " make dev-docker # Go API in Docker + auto-rebuild (pair with: cd ui && pnpm run dev)"
|
|
@echo " make dev-docker-down # stop dev Docker container"
|
|
@echo " make build-all # ui-build + build"
|
|
@echo " make clean # remove build artifacts"
|
|
@echo ""
|
|
@echo "Advanced (run scripts directly):"
|
|
@echo " ./scripts/sandbox.sh <up|down|shell|reset|status|logs|bare>"
|
|
@echo " ./scripts/test.sh --cover"
|
|
@echo " ./scripts/test_install.sh"
|
|
@echo " docker compose -f docker-compose.sandbox.yml --profile dev up -d # start without watch"
|
|
|
|
BINARY ?= bin/skillshare
|
|
|
|
build:
|
|
mkdir -p $(dir $(BINARY)) && go build -o $(BINARY) ./cmd/skillshare
|
|
|
|
build-meta:
|
|
./scripts/build.sh
|
|
|
|
build-windows:
|
|
./scripts/build-windows.sh $(SHARED)
|
|
|
|
run: build
|
|
$(BINARY) --help
|
|
|
|
test:
|
|
./scripts/test.sh
|
|
|
|
test-unit:
|
|
./scripts/test.sh --unit
|
|
|
|
test-int:
|
|
./scripts/test.sh --int
|
|
|
|
test-docker:
|
|
./scripts/test_docker.sh
|
|
|
|
test-docker-online:
|
|
./scripts/test_docker_online.sh
|
|
|
|
test-redteam: build
|
|
./scripts/red_team_test.sh
|
|
|
|
test-redteam-signal:
|
|
./scripts/test_redteam_signal.sh
|
|
|
|
test-redteam-rules-signal:
|
|
./scripts/test_redteam_rules_signal.sh
|
|
|
|
playground:
|
|
./scripts/sandbox_playground_up.sh
|
|
./scripts/sandbox_playground_shell.sh
|
|
|
|
playground-down:
|
|
./scripts/sandbox_playground_down.sh
|
|
|
|
devc:
|
|
./scripts/devc.sh up && ./scripts/devc.sh shell
|
|
|
|
devc-up:
|
|
./scripts/devc.sh up
|
|
|
|
devc-down:
|
|
./scripts/devc.sh down
|
|
|
|
devc-restart:
|
|
./scripts/devc.sh restart
|
|
|
|
devc-reset:
|
|
./scripts/devc.sh reset
|
|
|
|
devc-status:
|
|
./scripts/devc.sh status
|
|
|
|
verify:
|
|
./scripts/verify.sh up
|
|
|
|
verify-shell:
|
|
./scripts/verify.sh shell
|
|
|
|
verify-down:
|
|
./scripts/verify.sh down
|
|
|
|
verify-status:
|
|
./scripts/verify.sh status
|
|
|
|
verify-reset:
|
|
./scripts/verify.sh reset
|
|
|
|
dev-docker:
|
|
docker compose -f docker-compose.sandbox.yml --profile dev watch
|
|
|
|
dev-docker-down:
|
|
docker compose -f docker-compose.sandbox.yml --profile dev down
|
|
|
|
docker-build:
|
|
docker build -f docker/production/Dockerfile -t skillshare .
|
|
|
|
docker-build-multiarch:
|
|
docker buildx build --platform linux/amd64,linux/arm64 -f docker/production/Dockerfile -t skillshare .
|
|
|
|
lint:
|
|
go vet ./...
|
|
|
|
fmt:
|
|
gofmt -w ./cmd ./internal ./tests
|
|
|
|
fmt-check:
|
|
test -z "$$(gofmt -l ./cmd ./internal ./tests)"
|
|
|
|
docs-check:
|
|
python3 scripts/ai-context.py check
|
|
|
|
test-herdr:
|
|
node --test herdr/tests/*.test.mjs
|
|
|
|
check: docs-check fmt-check lint test test-herdr
|
|
|
|
install:
|
|
go install ./cmd/skillshare
|
|
|
|
ui-install:
|
|
cd ui && pnpm install
|
|
|
|
ui-build: ui-install
|
|
cd ui && pnpm run build
|
|
|
|
ui-dev:
|
|
@trap 'kill 0' EXIT; \
|
|
air & \
|
|
cd ui && pnpm run dev
|
|
|
|
build-all: ui-build build
|
|
|
|
clean:
|
|
rm -rf bin $(BINARY) coverage.out
|