Add Basefile and release script for bases deployment #18

Merged
arne merged 3 commits from bases-support into main 2026-04-14 10:34:04 +02:00
Owner

Summary

  • New Basefile describing books as an Alpine+OpenRC service for bases
  • Install task curls a prebuilt release asset from code.bas.es
  • OIDC env vars renamed via setup.auth.env to match what books reads
  • New scripts/release.sh cross-compiles linux/amd64, tags, pushes, and uploads the binary via tea

Test plan

  • Run scripts/release.sh v0.1.0 and verify the asset lands on code.bas.es
  • bases install on a.bas.es with BOOKS_OIDC_OWNER_SUB filled in
  • Confirm the service starts via OpenRC and responds on books.a.bas.es
## Summary - New `Basefile` describing books as an Alpine+OpenRC service for bases - Install task curls a prebuilt release asset from code.bas.es - OIDC env vars renamed via `setup.auth.env` to match what books reads - New `scripts/release.sh` cross-compiles `linux/amd64`, tags, pushes, and uploads the binary via `tea` ## Test plan - [ ] Run `scripts/release.sh v0.1.0` and verify the asset lands on code.bas.es - [ ] `bases install` on a.bas.es with `BOOKS_OIDC_OWNER_SUB` filled in - [ ] Confirm the service starts via OpenRC and responds on books.a.bas.es
Basefile installs books from a prebuilt release asset on code.bas.es
into an Alpine container, running under OpenRC. scripts/release.sh
cross-compiles, tags, and uploads the binary via tea.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Drop unused BOOKS_OIDC_REDIRECT_URL mapping; books derives it from
  BOOKS_PUBLIC_URL
- Drop install-time env snapshot (bases injects at start, not install)
- Write /etc/conf.d/books as bare KEY=value with 0600 perms
- Verify release binary via sha256 checksum
- Add backup:db task using sqlite3 .backup
- release.sh: go test before build, validate version format, refuse
  existing tags, let tea create the tag server-side, cleanup tmpdir
- Drop top-level version: field; local installs don't use it and
  keeping it duplicated with the install task's VERSION= drifted

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
URL-based bases installs require the top-level version: field. Keep
it, and have release.sh sed both it and the install task's VERSION=
line, committing the bump before tagging.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
arne merged commit fd5529a41c into main 2026-04-14 10:34:04 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
arne/books!18
No description provided.