1
0

android build: add own logic to calculate versionCode

Use our own logic to go from ELECTRUM_VERSION to numeric android versionCode,
instead of using the default conversion done by python-for-android.

Even before this, we were already patching p4a to modify their logic (see [0]).
This commit changes that logic again, and moves it into a separate script in our repo.
- calculation change is due to the f-droid maintainers asking for the
  arch code to be in the least significant digits (instead of most sig digits) (see [1])

I have pushed and changed to a new p4a branch, which is just a copy of the previous one
with 3 commits related to versionCode calc squashed.

[0]: edb7e4fe6d
[1]: https://github.com/spesmilo/electrum/issues/9210#issuecomment-2380559324
This commit is contained in:
SomberNight
2024-09-30 17:37:03 +00:00
parent e72b7ca25c
commit d415d2ab89
3 changed files with 67 additions and 4 deletions

View File

@@ -197,8 +197,8 @@ RUN cd /opt \
&& git remote add sombernight https://github.com/SomberNight/python-for-android \
&& git remote add accumulator https://github.com/accumulator/python-for-android \
&& git fetch --all \
# commit: from branch sombernight/qt6-wip (note: careful with force-pushing! see #8162) \
&& git checkout "58d21ad89b6182c0d70289d647eb85eaa412412c^{commit}" \
# commit: from branch sombernight/electrum_20240930 (note: careful with force-pushing! see #8162) \
&& git checkout "7197c1c28409fbeebd8494093349a2bfd770526a^{commit}" \
&& /opt/venv/bin/python3 -m pip install --no-build-isolation --no-dependencies -e .
# build env vars