android-oss-release-tracker icon indicating copy to clipboard operation
android-oss-release-tracker copied to clipboard

Wrong version number detected

Open Chr0matic1 opened this issue 3 years ago • 8 comments

In the case of https://github.com/Chooloo/koler/releases the last release is mistakenly detected as version 3 instead of 1.5.0

Chr0matic1 avatar Dec 07 '22 08:12 Chr0matic1

@Chr0matic1 tl;dr; try 0.1.6

Looks like Chooloo changedtheir release structure from v1.4.6 to Material 3 UI and Bug fixes. Another user recently added support to fallback to the tag name from the release name which helps. In addition I have changed the regex to require <number>.<number> to be detected as a version instead of a single number on its own.

jroddev avatar Dec 10 '22 22:12 jroddev

@jroddev

Unfortunately, the regex ([0-9]\\x2E[0-9]+\\S*) doesn't match e.g. 10.2 correctly (it'll see 0.2 instead), since it only matches a single digit before the dot.

Also, 71 apps in f-droid use a version name consisting of a single digit, which no longer works now:

$ grep -lE "versionName: '[0-9]+'\$" metadata/*.yml | wc -l
71

Maybe it would be best to not require a dot and use tag_name by default instead (and name as the fallback)?

obfusk avatar Dec 11 '22 02:12 obfusk

@obfusk thanks for reporting. I'm going to revert the change. Do you have any insight about the release name vs release tag_name in terms of reliability? I feel like they both be inconsistent across repositories and if I switch tag_name to be checked first or get too smart with the logic I'll just end up breaking a big bucket of apps that previously worked.

jroddev avatar Dec 11 '22 03:12 jroddev

Reverted in 0.1.7

jroddev avatar Dec 11 '22 03:12 jroddev

Do you have any insight about the release name vs release tag_name in terms of reliability?

IMO it would be very unusual for the tag name not to contain the version number. So I would expect tag names to be more reliable. But I don't really have any objective data to confirm that hypothesis.

obfusk avatar Dec 11 '22 04:12 obfusk

You can always give the user a way to choose between the two when adding the repo.

obfusk avatar Dec 11 '22 04:12 obfusk

Maybe even allow the user to provide a custom regex for unusual cases.

obfusk avatar Dec 11 '22 04:12 obfusk

I've added a note for next release to looks at tag_name and use fallback as name. I have also listed this as a configuration option on this issue: https://github.com/jroddev/android-oss-release-tracker/issues/18

jroddev avatar Dec 11 '22 06:12 jroddev