build-and-releaselisted
Install: claude install-skill ahmadAlMezaal/noctra
# Build And Release Noctra
Use this playbook for local builds, Raspberry Pi binaries, and official releases.
## Local Development Build
```bash
make build
# equivalent:
go build -o noctra ./cmd/noctra
```
Run the binary:
```bash
./noctra version
./noctra doctor
./noctra
```
## Verification Before Shipping
Run the standard checks:
```bash
go test ./...
go vet ./...
```
If `golangci-lint` is available, run:
```bash
golangci-lint run
```
The repository uses `.golangci.yml` v2 with standard linters plus `gofmt`.
## Raspberry Pi Cross-Compile
For Pi 4/5 with a 64-bit OS:
```bash
GOOS=linux GOARCH=arm64 go build -o noctra ./cmd/noctra
scp noctra pi@your-pi:/srv/noctra/
```
For Pi 3 or 32-bit Raspberry Pi OS:
```bash
GOOS=linux GOARCH=arm GOARM=7 go build -o noctra ./cmd/noctra
scp noctra pi@your-pi:/srv/noctra/
```
The Makefile also has:
```bash
make build-pi
```
which produces an arm64 binary named `noctra-pi`.
## Systemd Host Upgrade
On a host running Noctra as a `systemd --user` service:
```bash
make update
```
This pulls the latest branch, builds to `noctra.new`, atomically swaps it into place, and restarts `noctra.service`. A failed build leaves the previous binary intact.
Useful service commands:
```bash
make status
make logs
make restart
make stop
make start
```
## Docker Image
The `Dockerfile` builds a static Go binary and packages it into a `node:20-bookworm-slim` runtime with `git`, `gh`, Claude Code, and Codex installed.
For local validation: