feat: inject GIT_HASH into Dagger builds so About page shows git hash (#249) #250

Merged
guettlibot merged 2 commits from issue-249-fix into main 2026-05-25 13:10:17 +00:00
guettlibot commented 2026-05-25 13:08:55 +00:00 (Migrated from codeberg.org)

Summary

  • BuildAndroidRelease, BuildAndroidApk, and BuildLinuxRelease in ci/main.go now accept an optional commitHash parameter and pass --dart-define=GIT_HASH=<hash> to flutter
  • PublishAndroid and DeployApk/DeployLinux thread the hash through to the build functions
  • publish-android and build-android-bundle tasks in Taskfile.yml now capture git rev-parse --short HEAD and forward it as --commit-hash

Previously, Dagger-based builds (Play Store AAB, direct APK deploy, Linux release) did not inject GIT_HASH, so _gitHash in about_screen.dart was always empty and the "Git Commit" row was never shown. Local fvm-based builds already had the --dart-define=GIT_HASH=... flag; this aligns the Dagger builds to match.

Test plan

  • flutter analyze — no issues
  • flutter test test/unit test/widget — all 459 tests pass
  • Pre-commit hooks passed on commit
  • CI: Dagger full check suite via task check-dagger
## Summary - `BuildAndroidRelease`, `BuildAndroidApk`, and `BuildLinuxRelease` in `ci/main.go` now accept an optional `commitHash` parameter and pass `--dart-define=GIT_HASH=<hash>` to flutter - `PublishAndroid` and `DeployApk`/`DeployLinux` thread the hash through to the build functions - `publish-android` and `build-android-bundle` tasks in `Taskfile.yml` now capture `git rev-parse --short HEAD` and forward it as `--commit-hash` Previously, Dagger-based builds (Play Store AAB, direct APK deploy, Linux release) did not inject `GIT_HASH`, so `_gitHash` in `about_screen.dart` was always empty and the "Git Commit" row was never shown. Local `fvm`-based builds already had the `--dart-define=GIT_HASH=...` flag; this aligns the Dagger builds to match. ## Test plan - [x] `flutter analyze` — no issues - [x] `flutter test test/unit test/widget` — all 459 tests pass - [x] Pre-commit hooks passed on commit - [ ] CI: Dagger full check suite via `task check-dagger`
Sign in to join this conversation.