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

Rename final apk with arch in the name #967

Merged
merged 3 commits into from
Sep 11, 2019
Merged

Conversation

tito
Copy link
Member

@tito tito commented Sep 8, 2019

If i do 2 build with the same buildozer spec, but 2 profiles with different arch (or 2 buildozer spec), i don't want the final apk to be overwritten. So now the final apk name contains the arch:

For example:

  • connectage-0.4.0.23-arm64-v8a-release.apk
  • connectage-0.4.0.23-armeabi-v7a-release.apk

tshirtman
tshirtman previously approved these changes Sep 11, 2019
AndreMiras
AndreMiras previously approved these changes Sep 11, 2019
Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

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

Looking good overall, but we could achieve the same with less code.
Also I always wish we take the opportunity to increase our test coverage 😉

@@ -1144,6 +1146,11 @@ def build_package(self):
apk_dir = join(dist_dir, "bin")
apk_dest = apk

packagename = config.get('app', 'package.name')
apk_dest = u'{packagename}-{version}-{arch}-{mode}.apk'.format(
Copy link
Member

Choose a reason for hiding this comment

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

That line apk_dest = apk above should then be removed, since we override it and don't use it anymore

apk_dest = u'{packagename}-{version}-{mode}.apk'.format(
packagename=packagename, mode=mode, version=version)

apk_dest = u'{packagename}-{version}-{arch}-{mode}.apk'.format(
Copy link
Member

Choose a reason for hiding this comment

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

We could move it outside the if/else and have that part made only once since we're doing exactly the same inside and outside the if/else

@tito tito dismissed stale reviews from AndreMiras and tshirtman via c7c3020 September 11, 2019 16:38
AndreMiras
AndreMiras previously approved these changes Sep 11, 2019
Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@@ -1142,7 +1139,11 @@ def build_package(self):
version=version,
mode=mode)
apk_dir = join(dist_dir, "bin")
apk_dest = apk
packagename = config.get('app', 'package.name')
Copy link
Member

Choose a reason for hiding this comment

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

Theoretically this guy could also get out the if/else 😬 since we have it in both here and line 1126.
So I would suggest to remove it from both and put it just before the if is_gradle_build: block.

Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

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

less is more, thanks 👍

@tito tito merged commit 2af5346 into master Sep 11, 2019
@tshirtman tshirtman deleted the feature-rename-bin-per-arch branch September 11, 2019 19:07
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.

3 participants