An encrypted personal cloud built on the AT Protocol.

Add make targets for validation, testing, and container builds

Replace Tangled CI/CD pipelines with Makefile targets. Adds validate
(full CI), lint, test (Rust + web), images, and push-images. Uses
docker with SHA-tagged images, overridable via REGISTRY and TAG.

sans-self.org e1a6abed 371dff08

Waiting for spindle ...
+63 -1
+63 -1
Makefile
··· 9 9 WASM_CRATE = crates/opake-wasm 10 10 WASM_OUT = web/src/wasm/opake-wasm 11 11 12 - .PHONY: build wasm wasm-dev install-web-devs web-build setup 12 + .PHONY: build wasm wasm-dev install-web-devs web-build setup \ 13 + validate lint test rust-test fmt clippy web-lint web-typecheck web-test \ 14 + images push-images 13 15 14 16 ## Build all Rust crates 15 17 build: ··· 34 36 ## Set up dev environment (git hooks, dependencies) 35 37 setup: install-web-devs 36 38 ln -sf ../../tools/pre-commit.sh .git/hooks/pre-commit 39 + 40 + # --------------------------------------------------------------------------- 41 + # Validation 42 + # --------------------------------------------------------------------------- 43 + 44 + REGISTRY ?= zot.sans-self.org 45 + TAG ?= $(shell git rev-parse --short HEAD) 46 + 47 + ## Run all checks (CI equivalent) 48 + validate: fmt clippy test web-lint web-typecheck wasm web-test web-build 49 + 50 + ## Check Rust formatting 51 + fmt: 52 + cargo fmt --check 53 + 54 + ## Run clippy 55 + clippy: 56 + cargo clippy --workspace --all-targets -- -D warnings 57 + 58 + ## Run all tests (Rust + web) 59 + test: rust-test web-test 60 + 61 + ## Run Rust tests 62 + rust-test: 63 + cargo test --workspace 64 + 65 + ## Lint frontend 66 + web-lint: install-web-devs 67 + cd web && $(NVM) && bun run lint 68 + 69 + ## Typecheck frontend 70 + web-typecheck: install-web-devs 71 + cd web && $(NVM) && bun run tsc --noEmit 72 + 73 + ## Run frontend tests 74 + web-test: install-web-devs 75 + cd web && $(NVM) && bun run test 76 + 77 + ## Run all lints (Rust + web) 78 + lint: fmt clippy web-lint web-typecheck 79 + 80 + # --------------------------------------------------------------------------- 81 + # Container images 82 + # --------------------------------------------------------------------------- 83 + 84 + ## Build container images (appview + web) 85 + images: 86 + docker build -f Containerfile.appview \ 87 + -t $(REGISTRY)/opake/appview:$(TAG) \ 88 + -t $(REGISTRY)/opake/appview:latest . 89 + docker build -f Containerfile.web \ 90 + -t $(REGISTRY)/opake/web:$(TAG) \ 91 + -t $(REGISTRY)/opake/web:latest . 92 + 93 + ## Push container images to registry 94 + push-images: images 95 + docker push $(REGISTRY)/opake/appview:$(TAG) 96 + docker push $(REGISTRY)/opake/appview:latest 97 + docker push $(REGISTRY)/opake/web:$(TAG) 98 + docker push $(REGISTRY)/opake/web:latest