Remove "wc -l" from Jamulus.pro - #3903
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the QMake project (Jamulus.pro) to make Android ANDROID_VERSION_CODE generation more portable (avoiding wc -l, which is not reliably available on Windows) and to force ANDROID_VERSION_CODE to 0 for *dev* builds.
Changes:
- Replace
git log ... | wc -lwith a QMake-based commit-count computation using$$system(..., lines)plus$$list()/$$size(). - Set
ANDROID_VERSION_CODE = 0by default and only compute a commit-count-based version code for non-devversions when a.git/configis present.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
🤖 AI: Two checks on this, run with Qt 5.15.13 qmake on Linux:
A shadow build with the build directory outside the repository is unaffected either way: qmake resolves both |
Mmm. Does that include the Github autobuild workflow? I think that does |
Short description of changes
Currently, to get a build number for android builds, Jamulus.pro runs
wc -l-- this is unlikely to work on Windows and isn't necessary to achieve the result intended. This patch amends Jamulus.pro to use built-ins to do the calculation.It also amends the build number so it is aways zero on dev builds. This is so that only tagged builds have the number of commits counted. (We're unlikely to have more commits on a release branch than on main.)
CHANGELOG: SKIP
Context: Fixes an issue?
Makes Jamulus.pro more portable.
Does this change need documentation? What needs to be documented and how?
No.
Status of this Pull Request
Tested locally, including on branch and tagged builds.
What is missing until this pull request can be merged?
Should be good, subject to review.
Checklist