ci: attach a version.txt asset to every release - #20
Conversation
F-Droid's update checker cannot parse the computed versionCode out of gradle, so each release now carries the literals in a tiny asset that releases/latest serves at a stable URL.
|
Warning Review limit reachedNext included review available in 40 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🟡 Changes recommended
The new version.txt derivation should be normalized/validated to match the app’s Gradle version parsing to avoid release failures or mismatched metadata if version strings ever include a suffix.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a version.txt release asset so F-Droid can read versionName/versionCode without needing to evaluate/parse the Gradle-derived versionCode.
Changes:
- Generate a
version.txtfile during the release packaging step containingversionNameandversionCode. - Attach
version.txtas an additional asset on every GitHub Release created by the workflow.
File summaries
| File | Description |
|---|---|
| .github/workflows/release.yml | Generates and uploads version.txt alongside APK assets on each automated release. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # F-Droid's update checker reads this from releases/latest; it | ||
| # cannot parse the computed versionCode out of gradle. | ||
| BARE="${VERSION#v}" | ||
| IFS=. read -r MA MI PA <<< "$BARE" | ||
| printf 'versionName=%s | ||
| versionCode=%s | ||
| ' "$BARE" "$((MA*10000+MI*100+PA))" > version.txt |
F-Droid's checkupdates cannot statically parse our computed versionCode out of gradle, so releases now carry versionName/versionCode literals in a version.txt asset. The fdroiddata metadata points its HTTP update check at releases/latest/download/version.txt. Backfilled onto v0.1.3 by hand, this keeps future releases automatic.