Skip to content

com.termux: Auto update stable releases only and not pre-releases

Termux app (com.termux) is planned to have a new stable release v0.118.1 and a first ever pre-release v0.119.0-beta.1 this week if possible. Termux app uses semver 2.0 spec for GitHub release tags and app versions in the format major.minor.patch(-prerelease) with the v prefix before version, like v0.118.0. The issue is that we want that only the latest stable versions should show as Suggested versions to users and not the pre-release versions. Currently, UpdateCheckMode does not have a regex, so all tags including pre-releases will be auto-updated and automatically set in CurrentVersion and CurrentVersionCode as Suggested version. This pull adds a regex to only auto-update stable releases, and for pre-releases, we can send a pull request manually to add the version without updating CurrentVersion. That should work, right?

The same strategy implemented in this pull seems to be used for only the Keep Alive app (io.keepalive.android) as per for file in *.yml; do { [[ "$(grep -E "CurrentVersion: " "$file" | sed -E "s/CurrentVersion: //")" != "$(grep -E "versionName: " "$file" | tail -n 1 | sed -E "s/.*versionName: //")" ]] && grep -q -E "UpdateCheckMode: Tags " "$file" && grep -q -E "AutoUpdateMode: Version" "$file"; } && echo "$file"; done, although a stable release hasn't been released since it added the filter and manually added a beta version.

There does not seem to be way for CurrentVersion to be restricted to only stable releases. Something like a CurrentVersionUpdateMode field would be useful though in future, where UpdateCheckMode matches all tags, but CurrentVersion is only updated if release tag matches a regex. That way pulls won't need to be sent manually.

AutoUpdateMode: Version
UpdateCheckMode: Tags
CurrentVersionUpdateMode Tags ^v[0-9]+\.[0-9]+\.[0-9]+$

Thanks.

Merge request reports