mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-19 21:30:10 +01:00
metadata output-lines now substitute $$VERSION$$/etc.
This commit is contained in:
parent
0ef818486d
commit
d2570a493e
@ -859,7 +859,8 @@ def build_local(app, build, vcs, build_dir, output_dir, srclib_dir, extlib_dir,
|
||||
re.S | re.M).group(1)
|
||||
src = os.path.join(bindir, src)
|
||||
elif omethod == 'raw':
|
||||
globpath = os.path.join(root_dir, build.output)
|
||||
output_path = common.replace_build_vars(build.output, build)
|
||||
globpath = os.path.join(root_dir, output_path)
|
||||
apks = glob.glob(globpath)
|
||||
if len(apks) > 1:
|
||||
raise BuildException('Multiple apks match %s' % globpath, '\n'.join(apks))
|
||||
|
@ -1917,15 +1917,20 @@ def set_FDroidPopen_env(build=None):
|
||||
env[n] = build.ndk_path()
|
||||
|
||||
|
||||
def replace_build_vars(cmd, build):
|
||||
cmd = cmd.replace('$$COMMIT$$', build.commit)
|
||||
cmd = cmd.replace('$$VERSION$$', build.versionName)
|
||||
cmd = cmd.replace('$$VERCODE$$', build.versionCode)
|
||||
return cmd
|
||||
|
||||
|
||||
def replace_config_vars(cmd, build):
|
||||
cmd = cmd.replace('$$SDK$$', config['sdk_path'])
|
||||
cmd = cmd.replace('$$NDK$$', build.ndk_path())
|
||||
cmd = cmd.replace('$$MVN3$$', config['mvn3'])
|
||||
cmd = cmd.replace('$$QT$$', config['qt_sdk_path'] or '')
|
||||
if build is not None:
|
||||
cmd = cmd.replace('$$COMMIT$$', build.commit)
|
||||
cmd = cmd.replace('$$VERSION$$', build.versionName)
|
||||
cmd = cmd.replace('$$VERCODE$$', build.versionCode)
|
||||
cmd = replace_build_vars(cmd, build)
|
||||
return cmd
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@ Repo:https://gitlab.com/fdroid/privileged-extension.git
|
||||
|
||||
Build:0.2.1,2000
|
||||
commit=0.2.1
|
||||
output=app/build/distributions/FDroidPrivilegedExtensionFromBinaries-0.2.1.zip
|
||||
output=app/build/distributions/FDroidPrivilegedExtensionFromBinaries-$$VERSION$$.zip
|
||||
build=gradle assembleUpdateZipFromBinariesDebug
|
||||
|
||||
Auto Update Mode:Version %v
|
||||
|
Loading…
Reference in New Issue
Block a user