mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-09 00:40:11 +01:00
Fix silly forcever(sion|code) errors
This commit is contained in:
parent
831646dea2
commit
4233d0d15f
@ -1328,21 +1328,26 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, sdk_path,
|
|||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
# Insert version code and number into the manifest if necessary...
|
# Insert version code and number into the manifest if necessary...
|
||||||
|
flavour = None
|
||||||
|
if 'gradle' in build:
|
||||||
|
flavour = build['gradle'].split('@')[0]
|
||||||
|
if flavour in ['main', 'yes', '']:
|
||||||
|
flavour = None
|
||||||
if 'forceversion' in build:
|
if 'forceversion' in build:
|
||||||
for path in manifest_paths:
|
for path in manifest_paths(root_dir, flavour):
|
||||||
if not os.path.isfile(path):
|
if not os.path.isfile(path):
|
||||||
continue
|
continue
|
||||||
if subprocess.call(['sed','-r','-i',
|
if subprocess.call(['sed','-r','-i',
|
||||||
's/android:versionName="[^"]+"/android:versionName="' + build['version'] + '"/g',
|
's/android:versionName="[^"]+"/android:versionName="' + build['version'] + '"/g',
|
||||||
path], cwd=root_dir) != 0:
|
path]) != 0:
|
||||||
raise BuildException("Failed to amend manifest")
|
raise BuildException("Failed to amend manifest")
|
||||||
if 'forcevercode' in build:
|
if 'forcevercode' in build:
|
||||||
for path in manifest_paths:
|
for path in manifest_paths(root_dir, flavour):
|
||||||
if not os.path.isfile(path):
|
if not os.path.isfile(path):
|
||||||
continue
|
continue
|
||||||
if subprocess.call(['sed','-r','-i',
|
if subprocess.call(['sed','-r','-i',
|
||||||
's/android:versionCode="[^"]+"/android:versionCode="' + build['vercode'] + '"/g',
|
's/android:versionCode="[^"]+"/android:versionCode="' + build['vercode'] + '"/g',
|
||||||
path], cwd=root_dir) != 0:
|
path]) != 0:
|
||||||
raise BuildException("Failed to amend manifest")
|
raise BuildException("Failed to amend manifest")
|
||||||
|
|
||||||
# Delete unwanted file...
|
# Delete unwanted file...
|
||||||
|
Loading…
Reference in New Issue
Block a user