Development

The source is at git.fig.systems/eddie/sproutpal.

Build and test

go build -o sproutpal .
go test ./...

Run from a source checkout

The systemd/ folder holds units that run the binary from the checkout and read .env next to it. They assume the code lives in ~/homelab/compose/services/sproutpal; change WorkingDirectory, EnvironmentFile and ExecStart if it lives elsewhere. Copy .env.example to .env, fill it in, and run chmod 600 .env.

Release

A tag push builds and publishes a release with GoReleaser (.goreleaser.yaml) in Forgejo Actions (.forgejo/workflows/release.yml):

git tag v1.2.3
git push origin v1.2.3

A tag with a suffix, such as v1.2.3-rc.1, makes a pre-release: no latest image tag and no Homebrew update. Test the release build locally first; nothing is published:

goreleaser check
goreleaser release --snapshot --clean --skip=ko

Secrets (Forgejo user Settings → Actions → Secrets):

Secret Needed for
RELEASE_TOKEN Homebrew: a Forgejo access token (Repository: read and write) so the workflow can push the cask to eddie/homebrew-tap. Without it the Homebrew step is skipped.
QUAY_USERNAME, QUAY_PASSWORD, QUAY_NAMESPACE Images on quay.io: a robot account (<namespace>+<robot>) with Write on the repository
DOCKERHUB_USERNAME, DOCKERHUB_TOKEN Images on Docker Hub: an access token with Read & Write

winget manifests are generated into dist/ but not uploaded.

This site

These pages are in docs/ and built with MkDocs and the Terminal theme. Every push to main that changes docs/ or mkdocs.yml, and every release, rebuilds the site with .forgejo/docs.py. The download table on the Install page comes from the latest release.

pip install -r .forgejo/docs-requirements.txt
mkdocs serve