fix: derive Flutter image tag from .fvmrc to prevent version mismatch #405

Merged
guettlibot merged 3 commits from refs/pull/405/head into main 2026-06-04 15:35:09 +00:00
guettlibot commented 2026-06-04 04:23:15 +00:00 (Migrated from codeberg.org)

What

ci/main.go previously hardcoded the Flutter container image tag (ghcr.io/cirruslabs/flutter:3.44.0) separately from .fvmrc ({ "flutter": "3.44.1" }). These two values drifted, causing the deploy failure in #394.

How

New() now accepts ctx context.Context and returns (*Ci, error). It reads .fvmrc from the source directory, parses the flutter field, and stores it as Ci.FlutterVersion. toolchain() constructs the image tag as "ghcr.io/cirruslabs/flutter:" + m.FlutterVersion. Graph() also uses the live value instead of a stale literal.

Result: .fvmrc is the single source of truth. Bumping Flutter via Renovate or manually only requires editing .fvmrc; the Dagger pipeline picks up the new version automatically.

Verification

  • gofmt -e ci/main.go passes
  • No schema changes; no build_runner run needed

Closes #396

## What `ci/main.go` previously hardcoded the Flutter container image tag (`ghcr.io/cirruslabs/flutter:3.44.0`) separately from `.fvmrc` (`{ "flutter": "3.44.1" }`). These two values drifted, causing the deploy failure in #394. ## How `New()` now accepts `ctx context.Context` and returns `(*Ci, error)`. It reads `.fvmrc` from the source directory, parses the `flutter` field, and stores it as `Ci.FlutterVersion`. `toolchain()` constructs the image tag as `"ghcr.io/cirruslabs/flutter:" + m.FlutterVersion`. `Graph()` also uses the live value instead of a stale literal. Result: `.fvmrc` is the single source of truth. Bumping Flutter via Renovate or manually only requires editing `.fvmrc`; the Dagger pipeline picks up the new version automatically. ## Verification - `gofmt -e ci/main.go` passes - No schema changes; no `build_runner` run needed Closes #396
Sign in to join this conversation.