Skip to content

ci: attach a version.txt asset to every release - #20

Merged
Zingzy merged 1 commit into
mainfrom
ci/version-asset
Sep 2, 2026
Merged

ci: attach a version.txt asset to every release#20
Zingzy merged 1 commit into
mainfrom
ci/version-asset

Conversation

@Zingzy

@Zingzy Zingzy commented Sep 2, 2026

Copy link
Copy Markdown
Member

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.

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.
Copilot AI lite review requested due to automatic review settings September 2, 2026 21:35
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 40 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 27595868-ffe8-4a0e-8270-33db0d5b0d95

📥 Commits

Reviewing files that changed from the base of the PR and between b50f5df and 76a0c3f.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Zingzy
Zingzy merged commit 61236bf into main Sep 2, 2026
4 checks passed
@Zingzy
Zingzy deleted the ci/version-asset branch September 2, 2026 21:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.txt file during the release packaging step containing versionName and versionCode.
  • Attach version.txt as 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.

Comment on lines +128 to +134
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants