Commit fe8936f
Fix release asset ordering so the in-app updater fetches the APK (#686)
* Fix release asset ordering so the in-app updater fetches the APK
GitHub's API returns release assets sorted by name, not upload order.
The app's checkUpdate() always downloads assets[0], so once
build_and_sign.sh started attaching SHA256SUMS.txt and BUILD-INFO.txt
alongside the APK, those alphabetically-earlier names could be picked
up instead of the APK (#681). Rename the metadata files using the APK
filename as a literal prefix so it always sorts first.
* Show release version name in update notification, not asset filename
checkUpdate() already opened the release's html_url (the GitHub
release page) rather than a direct asset link, so tapping the
notification was never downloading a raw file. But its title used the
first release asset's filename, which is confusing and, per #681,
could be a metadata file rather than the APK depending on asset
ordering. Use the release's display name (e.g. "Version 2026072702")
instead, falling back to a formatted tag if the release has no name.
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent f9b17c1 commit fe8936f
4 files changed
Lines changed: 31 additions & 17 deletions
File tree
- app/src/main
- java/eu/faircode/netguard
- res/values
- docs
- scripts
Lines changed: 15 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
803 | 803 | | |
804 | 804 | | |
805 | 805 | | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
806 | 809 | | |
807 | 810 | | |
808 | 811 | | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
822 | 824 | | |
823 | 825 | | |
824 | 826 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| 349 | + | |
349 | 350 | | |
350 | 351 | | |
351 | 352 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
133 | 138 | | |
134 | | - | |
135 | | - | |
| 139 | + | |
| 140 | + | |
136 | 141 | | |
137 | 142 | | |
138 | 143 | | |
| |||
0 commit comments