Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Reorder assets [apks] on GitHub releases page & update descriptions #15927

Closed
david-allison opened this issue Mar 18, 2024 · 46 comments · Fixed by #17616
Closed
Assignees
Labels
Dev Development, testing & CI Good First Issue!
Milestone

Comments

@david-allison
Copy link
Member

david-allison commented Mar 18, 2024

Warning

We should not rename past files, as this breaks links

Reference page: https://github.com/ankidroid/Anki-Android/releases/tag/v2.17.6

Currently, the order of our GitHub releases is:

  • AnkiDroid-2.17.6-amazon-universal.apk
  • AnkiDroid-2.17.6-arm64-v8a.apk
  • AnkiDroid-2.17.6-armeabi-v7a.apk
  • AnkiDroid-2.17.6-full-universal.apk
  • AnkiDroid-2.17.6-play-universal.apk
  • AnkiDroid-2.17.6-x86.apk
  • AnkiDroid-2.17.6-x86_64.apk
  • AnkiDroid-2.17.6.parallel.A.apk
  • AnkiDroid-2.17.6.parallel.B.apk
  • AnkiDroid-2.17.6.parallel.C.apk
  • AnkiDroid-2.17.6.parallel.D.apk
  • AnkiDroid-2.17.6.parallel.E.apk

https://github.com/ankidroid/Anki-Android/releases/tag/v2.17.6

Ordering issues

The following ABIs are VERY rarely used nowadays. Almost all are arm64-v8a. These should be 'below the fold'

  • AnkiDroid-2.17.6-x86.apk
  • AnkiDroid-2.17.6-x86_64.apk
  • AnkiDroid-2.17.6-armeabi-v7a.apk

The following is good for newbies (as it means they don't need to know the ABI), but is MUCH larger:

  • AnkiDroid-2.17.6-full-universal.apk

The following are missing permissions

  • AnkiDroid-2.17.6-amazon-universal.apk - no CAMERA
  • AnkiDroid-2.17.6-play-universal.apk - no MANAGE_EXTERNAL_STORAGE

Resolution

We should reconsider this order and fix our release script

In addition, we should simplify our release notes on the page.


I would propose the order:

  • AnkiDroid-2.17.6-arm64-v8a.apk
  • AnkiDroid-2.17.6-full-universal.apk
  • AnkiDroid-2.17.6.parallel.A.apk
  • AnkiDroid-2.17.6.parallel.B.apk
  • AnkiDroid-2.17.6.parallel.C.apk
  • AnkiDroid-2.17.6.parallel.D.apk
  • AnkiDroid-2.17.6.parallel.E.apk
  • AnkiDroid-2.17.6-play-universal.apk
  • AnkiDroid-2.17.6-armeabi-v7a.apk
  • AnkiDroid-2.17.6-x86.apk
  • AnkiDroid-2.17.6-x86_64.apk
  • AnkiDroid-2.17.6-amazon-universal.apk

Description

See if you can do better than this:

Current Description

For regular users:

Install the main APK below, trying the 'full-universal' build first for new installs. If it refuses to install and run correctly or you have previously installed from the Play Store, you must pick the APK that matches CPU instruction set for your device.

This will be arm64-v8a for most phones from the last few years but here is a guide to help you choose


For testers and multiple profiles users:

The builds with 'full', 'play' or 'amazon' are useful for testing our builds for different app stores.

The builds with letter codes below (A, B, etc) are universal parallel builds. They will install side-by-side with the main APK for testing, or to connect to a different AnkiWeb account in combination with changing the storage directory in preferences

EDIT: See comments by @NameLessGO at the start of this thread for great suggestions

Implementation

I suspect that this code needs to be changed

for ABI in $ABIS; do
echo "Adding full APK for $ABI to Github release"
github-release upload --tag v"$VERSION" --name AnkiDroid-"$VERSION"-"$ABI".apk --file AnkiDroid-"$VERSION"-"$ABI".apk
done
# Copy flavor universal APKs to cwd
for FLAVOR in $FLAVORS; do
echo "Adding universal APK for $FLAVOR to Github release"
github-release upload --tag v"$VERSION" --name AnkiDroid-"$VERSION"-"$FLAVOR"-universal.apk --file AnkiDroid-"$VERSION"-"$FLAVOR"-universal.apk
done
# Not publishing to amazon pending: https://github.com/ankidroid/Anki-Android/issues/14161
#if [ "$PUBLIC" = "public" ]; then
# ./gradlew --stop
# echo "Running 'publishToAmazonAppStore' gradle target"
# if ! ./gradlew publishToAmazonAppStore
# then
# echo "Unable to publish to amazon app store"
# exit 1
# fi
# echo "Remember to add release notes and submit on Amazon: https://developer.amazon.com/apps-and-games/console/app/list"
#fi
# Now that Git is clean and the main release is done, run the parallel release script and upload them
echo "Running parallel package build"
./gradlew --stop
./tools/parallel-package-release.sh "$VERSION"
if [ "$PUBLIC" = "public" ]; then
BUILDNAMES='A B C D E' # For public builds we will post all parallels
else
BUILDNAMES='A B' # For alpha releases just post a couple parallel builds
fi
for BUILD in $BUILDNAMES; do
echo "Adding parallel build $BUILD to Github release"
github-release upload --tag v"$VERSION" --name AnkiDroid-"$VERSION".parallel."$BUILD".apk --file AnkiDroid-"$VERSION".parallel."$BUILD".apk
done

obsolete

You should first investigate whether the GitHub API allows us to reorder uploaded files for releases (assets)

A comment on the issue should be added detailing the outcome of your investigation

Depending on the result of the investigation, you should either:

  • (If reordering is possible): Use the functionality to reorder the assets after upload
  • (If reordering is not possible): Modify the above code to order the assets in the provided order

The file name determines the display order of the files

@david-allison david-allison added Good First Issue! Dev Development, testing & CI labels Mar 18, 2024
@david-allison david-allison changed the title [Enhancment] Reorder assets [apks] on GitHub releases page & update descriptions [Enhancement] Reorder assets [apks] on GitHub releases page & update descriptions Mar 18, 2024
@NameLessGO
Copy link

NameLessGO commented Mar 18, 2024

Suggestion:

Try "arm64-v8a" build first for new installs. If it refuses to install and run correctly, then you must pick the APK that matches CPU instruction set for your device.
here is a guide to help you choose

@david-allison
Copy link
Member Author

david-allison commented Mar 18, 2024

That guide is really low quality in terms of information density. Do we have anything better?

The link to the app is dodgy (3 separate link redirects blocked by uBlock, one of which had a ton of malware-related Google results)

I'd quickly be able to hack up a much better app and add it to F-Droid, it should only be a couple of lines of code to get the funtionality which we require.

I suspect an app like this would be out there if we looked for a little while

@NameLessGO
Copy link

NameLessGO commented Mar 18, 2024

Yes, there is https://github.com/kamgurgul/cpu-info for Play store, Fdroid, Huawei, and Amazon

ABI info in
CPU > ABI

@david-allison
Copy link
Member Author

david-allison commented Mar 18, 2024

Beautiful stuff!

Screenshot 2024-03-18 at 15 56 27

@NameLessGO
Copy link

NameLessGO commented Mar 18, 2024

Then for the webpage, we can make a documentation/Wiki with the screenshot and redirect users from release to there

Should make in FAQ or Development?

@david-allison
Copy link
Member Author

I don't know if we need to bother, it replaces the article you linked above with a sentenance

@Aditya13s

This comment has been minimized.

@david-allison

This comment has been minimized.

@Aditya13s
Copy link
Contributor

@david-allison current list is alphabetically ordered

@david-allison

This comment has been minimized.

@Aditya13s

This comment was marked as resolved.

@Aditya13s
Copy link
Contributor

@david-allison I searched about the issue but i think there is no option for reordering. Other way to do this is to give numbering in the start of each file to arrange them according to our needs.

@david-allison

This comment was marked as resolved.

@Aditya13s

This comment was marked as resolved.

@david-allison

This comment was marked as outdated.

@Aditya13s

This comment was marked as resolved.

@david-allison
Copy link
Member Author

david-allison commented Mar 20, 2024

I want something obvious to users who may not be too technical.

For ABI splits: Ideally a word which isn't complex, fairly short, and conveys 'this may be useful in rare circumstances if you're using an old phone'.

I think this is a good solution/ordering:

  • AnkiDroid-2.17.6-arm64-v8a.apk
  • AnkiDroid-2.17.6-full-universal.apk
  • AnkiDroid-2.17.6.parallel.A.apk
  • AnkiDroid-2.17.6.parallel.B.apk
  • AnkiDroid-2.17.6.parallel.C.apk
  • AnkiDroid-2.17.6.parallel.D.apk
  • AnkiDroid-2.17.6.parallel.E.apk
  • dev-AnkiDroid-2.17.6-play-universal.apk
  • dev-AnkiDroid-2.17.6-amazon-universal.apk
  • variant-abi-AnkiDroid-2.17.6-armeabi-v7a.apk
  • variant-abi-AnkiDroid-2.17.6-x86.apk
  • variant-abi-AnkiDroid-2.17.6-x86_64.apk

@Aditya13s
Copy link
Contributor

Looking good to me. We can try this.

@david-allison
Copy link
Member Author

david-allison commented Mar 20, 2024

Great!

I think the only other task would be to simplify the description

Current Description

For regular users:

Install the main APK below, trying the 'full-universal' build first for new installs. If it refuses to install and run correctly or you have previously installed from the Play Store, you must pick the APK that matches CPU instruction set for your device.

This will be arm64-v8a for most phones from the last few years but here is a guide to help you choose


For testers and multiple profiles users:

The builds with 'full', 'play' or 'amazon' are useful for testing our builds for different app stores.

The builds with letter codes below (A, B, etc) are universal parallel builds. They will install side-by-side with the main APK for testing, or to connect to a different AnkiWeb account in combination with changing the storage directory in preferences


Proposed Description

Important

GitHub does not auto-update apps

For regular users

Install arm64-v8a below. If it fails to install, use Parallel.A

Parallel builds install side-by-side with the main APK, allowing you to use different settings and profiles (via the AnkiDroid directory advanced setting & a different AnkiWeb login)

For testers

The builds with full, play and amazon are useful for testing our builds for different app stores

  • full: F-Droid & GitHub Parallel apks
  • play: Google Play - missing MANAGE_EXTERNAL_STORAGE [app data is deleted on uninstall]
  • amazon: Amazon - missing CAMERA

ABI variants

We perform ABI splits to reduce APK size. In rare cases, a phone may not be using the arm64-v8a ABI. You can find your phone's ABI using kamgurgul/cpu-info. If disk space isn't an issue, use the full apk

@david-allison
Copy link
Member Author

@mikehardy pinging for a quick pre-review, I may have over-simplified the explanation

@mikehardy
Copy link
Member

I think this is great - it's a significant improvement on the big text blob I hacked up in a hurry and haven't touched since 🙈

+1 on all of it

@david-allison
Copy link
Member Author

david-allison commented Apr 18, 2024

@Aditya13s Any progress here? Would be great to get this in for 2.18

@Aditya13s
Copy link
Contributor

@Aditya13s Any progress here? Would be great to get this in for 2.18

I've looked into it, and it seems that when we upload assets , GitHub automatically sorts them in alphabetically order.
We have to manually rename the assets

@david-allison
Copy link
Member Author

We have control over the names and can change them in our release script

@Aditya13s
Copy link
Contributor

Is there anything which i can do?

@david-allison
Copy link
Member Author

david-allison commented Apr 18, 2024

You're assigned the issue, the 'Implementation' section lists the relevant script

@david-allison
Copy link
Member Author

david-allison commented Jun 18, 2024

release.sh needs to be updated. The file is linked in the main issue description

The ideal ordering and release description are included in comments of this issue

@david-allison
Copy link
Member Author

Good first issue, so I won't take this on

@Aditya13s
Copy link
Contributor

I am working on it. @david-allison

@david-allison
Copy link
Member Author

It's been months, what's the status and what're the next steps?

@david-allison
Copy link
Member Author

david-allison commented Oct 4, 2024

@Aditya13s I'd like to take this through to completion before 2.19 is released if possible. Are you still working on this?

@Aditya13s
Copy link
Contributor

@david-allison I stopped working on it because I was not able to find how to fix this issue. If you can provide me some hint then i can complete it in no time.

@david-allison
Copy link
Member Author

What do you need help with?

@Aditya13s
Copy link
Contributor

I need help with what to change in the code.

@mikehardy
Copy link
Member

@Aditya13s I just looked at the comments here. All the information seems to be available. This may not be a fit for you

@Haz3-jolt
Copy link
Contributor

I'd Like to work on this.

@david-allison david-allison assigned Haz3-jolt and unassigned Aditya13s Dec 17, 2024
@david-allison
Copy link
Member Author

david-allison commented Dec 17, 2024

@Haz3-jolt Great! there's quite a lot of discussion which has gone on here.

I believe we want:

Ordering

  • AnkiDroid-2.17.6-arm64-v8a.apk
  • AnkiDroid-2.17.6-full-universal.apk
  • AnkiDroid-2.17.6.parallel.A.apk
  • AnkiDroid-2.17.6.parallel.B.apk
  • AnkiDroid-2.17.6.parallel.C.apk
  • AnkiDroid-2.17.6.parallel.D.apk
  • AnkiDroid-2.17.6.parallel.E.apk
  • dev-AnkiDroid-2.17.6-play-universal.apk
  • dev-AnkiDroid-2.17.6-amazon-universal.apk
  • variant-abi-AnkiDroid-2.17.6-armeabi-v7a.apk
  • variant-abi-AnkiDroid-2.17.6-x86.apk
  • variant-abi-AnkiDroid-2.17.6-x86_64.apk

Proposed Description

Important

GitHub does not auto-update apps

For regular users

Install arm64-v8a below. If it fails to install, use Parallel.A

Parallel builds install side-by-side with the main APK, allowing you to use different settings and profiles (via the AnkiDroid directory advanced setting & a different AnkiWeb login)

For testers

Builds with full, play and amazon are useful for testing our builds for different app stores

  • full: F-Droid & GitHub Parallel apks
  • play: Google Play - missing MANAGE_EXTERNAL_STORAGE [app data is deleted on uninstall]
  • amazon: Amazon - missing CAMERA

ABI variants

We perform ABI splits to reduce APK size. In rare cases, a phone may not be using the arm64-v8a ABI. You can find your phone's ABI using kamgurgul/cpu-info. If disk space isn't an issue, use the full apk

@Haz3-jolt
Copy link
Contributor

Few changes to release.sh that need addressing before the reordering:
the addition of the proguard mappings and un-minified.

I have a draft ready for the order from the mentioned:

AnkiDroid-2.17.6-amazon-universal.apk
AnkiDroid-2.17.6-arm64-v8a.apk
AnkiDroid-2.17.6-armeabi-v7a.apk
AnkiDroid-2.17.6-full-universal.apk
AnkiDroid-2.17.6-play-universal.apk
AnkiDroid-2.17.6-x86.apk
AnkiDroid-2.17.6-x86_64.apk
AnkiDroid-2.17.6.parallel.A.apk
AnkiDroid-2.17.6.parallel.B.apk
AnkiDroid-2.17.6.parallel.C.apk
AnkiDroid-2.17.6.parallel.D.apk
AnkiDroid-2.17.6.parallel.E.apk

to the cleaner suggested:

AnkiDroid-2.17.6-arm64-v8a.apk
AnkiDroid-2.17.6-full-universal.apk
AnkiDroid-2.17.6.parallel.A.apk
AnkiDroid-2.17.6.parallel.B.apk
AnkiDroid-2.17.6.parallel.C.apk
AnkiDroid-2.17.6.parallel.D.apk
AnkiDroid-2.17.6.parallel.E.apk
dev-AnkiDroid-2.17.6-play-universal.apk
dev-AnkiDroid-2.17.6-amazon-universal.apk
variant-abi-AnkiDroid-2.17.6-armeabi-v7a.apk
variant-abi-AnkiDroid-2.17.6-x86.apk
variant-abi-AnkiDroid-2.17.6-x86_64.apk

The issue is with the addition of the proguard mappings and un-minified, it will look like this:

AnkiDroid-2.17.6-arm64-v8a.apk
AnkiDroid-2.17.6-full-universal.apk
+ AnkiDroid-2.17.6-full-universal-nominify.apk
AnkiDroid-2.17.6.parallel.A.apk
AnkiDroid-2.17.6.parallel.B.apk
AnkiDroid-2.17.6.parallel.C.apk
AnkiDroid-2.17.6.parallel.D.apk
AnkiDroid-2.17.6.parallel.E.apk
dev-AnkiDroid-2.17.6-play-universal.apk
dev-AnkiDroid-2.17.6-amazon-universal.apk
+ proguard-mappings.tar.gz 
variant-abi-AnkiDroid-2.17.6-armeabi-v7a.apk
variant-abi-AnkiDroid-2.17.6-x86.apk
variant-abi-AnkiDroid-2.17.6-x86_64.apk

I think we need to think of alternative to variant-abi and should have a prefix for the un minified version.

@Haz3-jolt
Copy link
Contributor

@david-allison is it okay if variant-abi is instead formatted as ob-variant-abi, since most of these are kinda obselete, i just need some way to push them down the order but keep proguard at the bottom.
Also is prefix necessary for un-minify? or is the current location enough with a statement in the description saying its the most newbie friendly.

@david-allison
Copy link
Member Author

david-allison commented Dec 17, 2024

Actionable feedback

I'd prefix the new entries with a z- to move them to the bottom of the list
No opinion on the -nominify, but I'd have it second-last: it's development-only.


If it helps, I'd be happy with 'uncommon ABI' or similar terminology, but not 'obsolete'. Definitely not 'obs' as the intention isn't clear.

proguard would be best at the end. It's not an APK

I'm sure @mikehardy would disagree, but I'd consider removing -nominify and moving it to a GitHub action. It doesn't see much, if any use.

@Haz3-jolt
Copy link
Contributor

ok, for now I'll add a z- prefix to nominify and progruard to push them down the order, I agree on not using obs, just couldn't think of another prefix.

@Haz3-jolt
Copy link
Contributor

This is how the final order will look like:

AnkiDroid-2.17.6-arm64-v8a.apk
AnkiDroid-2.17.6-full-universal.apk
AnkiDroid-2.17.6.parallel.A.apk
AnkiDroid-2.17.6.parallel.B.apk
AnkiDroid-2.17.6.parallel.C.apk
AnkiDroid-2.17.6.parallel.D.apk
AnkiDroid-2.17.6.parallel.E.apk
dev-AnkiDroid-2.17.6-play-universal.apk
dev-AnkiDroid-2.17.6-amazon-universal.apk
variant-abi-AnkiDroid-2.17.6-armeabi-v7a.apk
variant-abi-AnkiDroid-2.17.6-x86.apk
variant-abi-AnkiDroid-2.17.6-x86_64.apk
z-AnkiDroid-2.17.6-full-universal-nominify.apk
z-proguard-mappings.tar.gz

should I create a PR?

@david-allison
Copy link
Member Author

LGTM!

@Haz3-jolt
Copy link
Contributor

PR published!

@github-actions github-actions bot added this to the 2.21 release milestone Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev Development, testing & CI Good First Issue!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants