1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-20 13:50:12 +01:00

Merge branch 'set_e' into 'master'

Run shell scripts with -e (Closes: #1035)

Closes #1035

See merge request fdroid/fdroidserver!1185
This commit is contained in:
Michael Pöhn 2022-11-03 12:26:06 +00:00
commit 52849deea0
10 changed files with 477 additions and 254 deletions

View File

@ -390,7 +390,7 @@ def build_local(app, build, vcs, build_dir, output_dir, log_dir, srclib_dir, ext
logging.info("Running 'sudo' commands in %s" % os.getcwd()) logging.info("Running 'sudo' commands in %s" % os.getcwd())
p = FDroidPopen(['sudo', 'DEBIAN_FRONTEND=noninteractive', p = FDroidPopen(['sudo', 'DEBIAN_FRONTEND=noninteractive',
'bash', '-x', '-c', build.sudo]) 'bash', '-e', '-u', '-o', 'pipefail', '-x', '-c', '; '.join(build.sudo)])
if p.returncode != 0: if p.returncode != 0:
raise BuildException("Error running sudo command for %s:%s" % raise BuildException("Error running sudo command for %s:%s" %
(app.id, build.versionName), p.output) (app.id, build.versionName), p.output)
@ -535,13 +535,13 @@ def build_local(app, build, vcs, build_dir, output_dir, log_dir, srclib_dir, ext
# Run a build command if one is required... # Run a build command if one is required...
if build.build: if build.build:
logging.info("Running 'build' commands in %s" % root_dir) logging.info("Running 'build' commands in %s" % root_dir)
cmd = common.replace_config_vars(build.build, build) cmd = common.replace_config_vars("; ".join(build.build), build)
# Substitute source library paths into commands... # Substitute source library paths into commands...
for name, number, libpath in srclibpaths: for name, number, libpath in srclibpaths:
cmd = cmd.replace('$$' + name + '$$', os.path.join(os.getcwd(), libpath)) cmd = cmd.replace('$$' + name + '$$', os.path.join(os.getcwd(), libpath))
p = FDroidPopen(['bash', '-x', '-c', cmd], cwd=root_dir) p = FDroidPopen(['bash', '-e', '-u', '-o', 'pipefail', '-x', '-c', cmd], cwd=root_dir)
if p.returncode != 0: if p.returncode != 0:
raise BuildException("Error running build command for %s:%s" % raise BuildException("Error running build command for %s:%s" %

View File

@ -2055,9 +2055,9 @@ def getsrclib(spec, srclib_dir, basepath=False,
if prepare: if prepare:
if srclib["Prepare"]: if srclib["Prepare"]:
cmd = replace_config_vars(srclib["Prepare"], build) cmd = replace_config_vars("; ".join(srclib["Prepare"]), build)
p = FDroidPopen(['bash', '-x', '-c', '--', cmd], cwd=libdir) p = FDroidPopen(['bash', '-e', '-u', '-o', 'pipefail', '-x', '-c', '--', cmd], cwd=libdir)
if p.returncode != 0: if p.returncode != 0:
raise BuildException("Error running prepare command for srclib %s" raise BuildException("Error running prepare command for srclib %s"
% name, p.output) % name, p.output)
@ -2119,10 +2119,10 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
# Run an init command if one is required # Run an init command if one is required
if build.init: if build.init:
cmd = replace_config_vars(build.init, build) cmd = replace_config_vars("; ".join(build.init), build)
logging.info("Running 'init' commands in %s" % root_dir) logging.info("Running 'init' commands in %s" % root_dir)
p = FDroidPopen(['bash', '-x', '-c', '--', cmd], cwd=root_dir) p = FDroidPopen(['bash', '-e', '-u', '-o', 'pipefail', '-x', '-c', '--', cmd], cwd=root_dir)
if p.returncode != 0: if p.returncode != 0:
raise BuildException("Error running init command for %s:%s" % raise BuildException("Error running init command for %s:%s" %
(app.id, build.versionName), p.output) (app.id, build.versionName), p.output)
@ -2286,13 +2286,13 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
if build.prebuild: if build.prebuild:
logging.info("Running 'prebuild' commands in %s" % root_dir) logging.info("Running 'prebuild' commands in %s" % root_dir)
cmd = replace_config_vars(build.prebuild, build) cmd = replace_config_vars("; ".join(build.prebuild), build)
# Substitute source library paths into prebuild commands # Substitute source library paths into prebuild commands
for name, number, libpath in srclibpaths: for name, number, libpath in srclibpaths:
cmd = cmd.replace('$$' + name + '$$', os.path.join(os.getcwd(), libpath)) cmd = cmd.replace('$$' + name + '$$', os.path.join(os.getcwd(), libpath))
p = FDroidPopen(['bash', '-x', '-c', '--', cmd], cwd=root_dir) p = FDroidPopen(['bash', '-e', '-u', '-o', 'pipefail', '-x', '-c', '--', cmd], cwd=root_dir)
if p.returncode != 0: if p.returncode != 0:
raise BuildException("Error running prebuild command for %s:%s" % raise BuildException("Error running prebuild command for %s:%s" %
(app.id, build.versionName), p.output) (app.id, build.versionName), p.output)

View File

@ -516,8 +516,11 @@ def parse_yaml_srclib(metadatapath):
thisinfo[key] = data[key] thisinfo[key] = data[key]
elif data[key] is None: elif data[key] is None:
thisinfo[key] = [''] thisinfo[key] = ['']
elif key == 'Prepare' and isinstance(data[key], list): elif key == 'Prepare' or flagtype(key) == TYPE_SCRIPT:
thisinfo[key] = ' && '.join(data[key]) if isinstance(data[key], list):
thisinfo[key] = data[key]
else:
thisinfo[key] = [data[key]] if data[key] else []
else: else:
thisinfo[key] = str(data[key] or '') thisinfo[key] = str(data[key] or '')
@ -847,9 +850,8 @@ def post_parse_yaml_metadata(yamldata):
_flagtype = flagtype(flag) _flagtype = flagtype(flag)
if _flagtype is TYPE_SCRIPT: if _flagtype is TYPE_SCRIPT:
# concatenate script flags into a single string if they are stored as list if isinstance(build[flag], str):
if isinstance(build[flag], list): build[flag] = [build[flag]]
build[flag] = ' && '.join(build[flag])
elif _flagtype is TYPE_STRING: elif _flagtype is TYPE_STRING:
# things like versionNames are strings, but without quotes can be numbers # things like versionNames are strings, but without quotes can be numbers
if isinstance(build[flag], float) or isinstance(build[flag], int): if isinstance(build[flag], float) or isinstance(build[flag], int):
@ -916,12 +918,6 @@ def write_yaml(mf, app):
return value[0] return value[0]
else: else:
return value return value
else:
script_lines = value.split(' && ')
if len(script_lines) > 1:
return script_lines
else:
return value
else: else:
return value return value

View File

@ -375,7 +375,7 @@ class CommonTest(unittest.TestCase):
build = fdroidserver.metadata.Build() build = fdroidserver.metadata.Build()
build.commit = 'master' build.commit = 'master'
build.gradle = ['yes'] build.gradle = ['yes']
build.prebuild = 'test -d $$FakeSrcLib$$/testdirshouldexist' # actual test condition build.prebuild = ['test -d $$FakeSrcLib$$/testdirshouldexist'] # actual test condition
build.srclibs = [srclibname + '@1.2.3'] build.srclibs = [srclibname + '@1.2.3']
build.subdir = subdir build.subdir = subdir
build.versionCode = 0xCAFE build.versionCode = 0xCAFE

View File

@ -40,7 +40,17 @@ import fdroidserver.metadata # noqa
def _build_yaml_representer(dumper, data): def _build_yaml_representer(dumper, data):
"""Create a YAML representation of a Build instance.""" """Create a YAML representation of a Build instance."""
return dumper.represent_dict(data) # internal representation of keys were switched
# to lists instead of strings concatenated by &&
# https://gitlab.com/fdroid/fdroidserver/merge_requests/1185
output = {}
for k, v in data.items():
if k in ("build", "init", "prebuild", "sudo"):
output[k] = " && ".join(v)
else:
output[k] = v
return dumper.represent_dict(output)
parser = ArgumentParser() parser = ArgumentParser()

View File

@ -504,15 +504,24 @@ class MetadataTest(unittest.TestCase):
{ {
'versionCode': 1, 'versionCode': 1,
'versionName': 'v0.1.0', 'versionName': 'v0.1.0',
'sudo': "apt-get update && " 'sudo': [
"apt-get install -y whatever && " "apt-get update",
"apt-get install -y whatever",
"sed -i -e 's/<that attr=\"bad\"/<that attr=\"good\"/' ~/.whatever/config.xml", "sed -i -e 's/<that attr=\"bad\"/<that attr=\"good\"/' ~/.whatever/config.xml",
'init': "bash generate_some_file.sh && " ],
'init': [
"bash generate_some_file.sh",
"sed -i -e 'g/what/ever/' /some/file", "sed -i -e 'g/what/ever/' /some/file",
'prebuild': "npm something && echo 'important setting' >> /a/file", ],
'build': "./gradlew someSpecialTask && " 'prebuild': [
"sed -i 'd/that wrong config/' gradle.properties && " "npm something",
"echo 'important setting' >> /a/file",
],
'build': [
"./gradlew someSpecialTask",
"sed -i 'd/that wrong config/' gradle.properties",
"./gradlew compile", "./gradlew compile",
],
} }
], ],
}, },
@ -551,15 +560,23 @@ class MetadataTest(unittest.TestCase):
{ {
'versionCode': 1, 'versionCode': 1,
'versionName': 'v0.1.0', 'versionName': 'v0.1.0',
'sudo': "apt-get update && " 'sudo': [
"apt-get update && "
"apt-get install -y whatever && " "apt-get install -y whatever && "
"sed -i -e 's/<that attr=\"bad\"/<that attr=\"good\"/' ~/.whatever/config.xml", "sed -i -e 's/<that attr=\"bad\"/<that attr=\"good\"/' ~/.whatever/config.xml"
'init': "bash generate_some_file.sh && " ],
"sed -i -e 'g/what/ever/' /some/file", 'init': [
'prebuild': "npm something && echo 'important setting' >> /a/file", "bash generate_some_file.sh && "
'build': "./gradlew someSpecialTask && " "sed -i -e 'g/what/ever/' /some/file"
],
'prebuild': [
"npm something && echo 'important setting' >> /a/file"
],
'build': [
"./gradlew someSpecialTask && "
"sed -i 'd/that wrong config/' gradle.properties && " "sed -i 'd/that wrong config/' gradle.properties && "
"./gradlew compile", "./gradlew compile"
],
} }
], ],
}, },
@ -593,7 +610,7 @@ class MetadataTest(unittest.TestCase):
{ {
'versionCode': 1, 'versionCode': 1,
'versionName': 'v0.1.0', 'versionName': 'v0.1.0',
'prebuild': "a && b && " "sed -i 's,a,b,'", 'prebuild': ["a && b && " "sed -i 's,a,b,'"],
} }
], ],
}, },
@ -630,10 +647,10 @@ class MetadataTest(unittest.TestCase):
build = fdroidserver.metadata.Build() build = fdroidserver.metadata.Build()
build.versionCode = 102030 build.versionCode = 102030
build.versionName = 'v1.2.3' build.versionName = 'v1.2.3'
build.sudo = "chmod +rwx /opt" build.sudo = ["chmod +rwx /opt"]
build.init = "sed -i -e 'g/what/ever/' /some/file" build.init = ["sed -i -e 'g/what/ever/' /some/file"]
build.prebuild = "sed -i 'd/that wrong config/' gradle.properties" build.prebuild = ["sed -i 'd/that wrong config/' gradle.properties"]
build.build = "./gradlew compile" build.build = ["./gradlew compile"]
app['Builds'].append(build) app['Builds'].append(build)
fdroidserver.metadata.write_yaml(mf, app) fdroidserver.metadata.write_yaml(mf, app)
mf.seek(0) mf.seek(0)
@ -762,10 +779,21 @@ class MetadataTest(unittest.TestCase):
build = fdroidserver.metadata.Build() build = fdroidserver.metadata.Build()
build.versionCode = 102030 build.versionCode = 102030
build.versionName = 'v1.2.3' build.versionName = 'v1.2.3'
build.sudo = "apt-get update && apt-get install -y whatever && sed -i -e 's/<that attr=\"bad\"/<that attr=\"good\"/' ~/.whatever/config.xml" build.sudo = [
build.init = "bash generate_some_file.sh && sed -i -e 'g/what/ever/' /some/file" "apt-get update",
build.prebuild = "npm something && echo 'important setting' >> /a/file" "apt-get install -y whatever",
build.build = "./gradlew someSpecialTask && sed -i 'd/that wrong config/' gradle.properties && ./gradlew compile" "sed -i -e 's/<that attr=\"bad\"/<that attr=\"good\"/' ~/.whatever/config.xml",
]
build.init = [
"bash generate_some_file.sh",
"sed -i -e 'g/what/ever/' /some/file",
]
build.prebuild = ["npm something", "echo 'important setting' >> /a/file"]
build.build = [
"./gradlew someSpecialTask",
"sed -i 'd/that wrong config/' gradle.properties",
"./gradlew compile",
]
app['Builds'].append(build) app['Builds'].append(build)
fdroidserver.metadata.write_yaml(mf, app) fdroidserver.metadata.write_yaml(mf, app)
mf.seek(0) mf.seek(0)
@ -914,7 +942,7 @@ class MetadataTest(unittest.TestCase):
'Repo': 'https://git.host/repo.git', 'Repo': 'https://git.host/repo.git',
'RepoType': 'git', 'RepoType': 'git',
'Subdir': [''], 'Subdir': [''],
'Prepare': '', 'Prepare': [],
}, },
srclib, srclib,
) )
@ -943,9 +971,11 @@ class MetadataTest(unittest.TestCase):
'Repo': 'https://github.com/cketti/ckChangeLog', 'Repo': 'https://github.com/cketti/ckChangeLog',
'RepoType': 'git', 'RepoType': 'git',
'Subdir': ['library', 'ckChangeLog/src/main'], 'Subdir': ['library', 'ckChangeLog/src/main'],
'Prepare': "[ -f project.properties ] || echo 'source.dir=java' > " 'Prepare': [
"[ -f project.properties ] || echo 'source.dir=java' > "
"ant.properties && echo -e " "ant.properties && echo -e "
"'android.library=true\\ntarget=android-19' > project.properties", "'android.library=true\\ntarget=android-19' > project.properties"
],
}, },
) )
@ -993,8 +1023,10 @@ class MetadataTest(unittest.TestCase):
'You take the red pill—you stay in Wonderland', 'You take the red pill—you stay in Wonderland',
'and I show you how deep the rabbit-hole goes.', 'and I show you how deep the rabbit-hole goes.',
], ],
'Prepare': 'There is a difference between knowing the path ' 'Prepare': [
'and walking the path.', 'There is a difference between knowing the path '
'and walking the path.'
],
} }
}, },
) )
@ -1014,14 +1046,10 @@ class MetadataTest(unittest.TestCase):
Subdir: Subdir:
Prepare: Prepare:
- The Matrix is a system, Neo. - Many
- That system is our enemy. - invalid
- But when you're inside, you look around, what do you see? - commands
- Businessmen, teachers, lawyers, carpenters. - here.
- The very minds of the people we are trying to save.
- But until we do, these people are still a part of that system and that makes them our enemy.
- You have to understand, most of these people are not ready to be unplugged.
- And many of them are so inert, so hopelessly dependent on the system that they will fight to protect it.
''' '''
) )
) )
@ -1034,14 +1062,12 @@ class MetadataTest(unittest.TestCase):
'RepoType': 'git', 'RepoType': 'git',
'Repo': 'https://git.host/repo.git', 'Repo': 'https://git.host/repo.git',
'Subdir': [''], 'Subdir': [''],
'Prepare': 'The Matrix is a system, Neo. && ' 'Prepare': [
'That system is our enemy. && ' 'Many',
'But when you\'re inside, you look around, what do you see? && ' 'invalid',
'Businessmen, teachers, lawyers, carpenters. && ' 'commands',
'The very minds of the people we are trying to save. && ' 'here.',
'But until we do, these people are still a part of that system and that makes them our enemy. && ' ],
'You have to understand, most of these people are not ready to be unplugged. && '
'And many of them are so inert, so hopelessly dependent on the system that they will fight to protect it.',
} }
}, },
) )
@ -1081,7 +1107,7 @@ class MetadataTest(unittest.TestCase):
'RepoType': 'git', 'RepoType': 'git',
'Repo': 'https://git.host/repo.git', 'Repo': 'https://git.host/repo.git',
'Subdir': [''], 'Subdir': [''],
'Prepare': '', 'Prepare': [],
}, },
'simple': { 'simple': {
'RepoType': 'git', 'RepoType': 'git',

View File

@ -144,7 +144,8 @@ Builds:
srclibs: [] srclibs: []
subdir: null subdir: null
submodules: false submodules: false
sudo: echo 'this is just a test' sudo:
- echo 'this is just a test'
target: null target: null
timeout: null timeout: null
versionCode: 6 versionCode: 6

View File

@ -281,7 +281,8 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: android update project -p ../com_actionbarsherlock prebuild:
- android update project -p ../com_actionbarsherlock
rm: [] rm: []
scandelete: [] scandelete: []
scanignore: [] scanignore: []
@ -316,7 +317,8 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: android update project -p ../com_actionbarsherlock prebuild:
- android update project -p ../com_actionbarsherlock
rm: [] rm: []
scandelete: [] scandelete: []
scanignore: [] scanignore: []
@ -351,7 +353,8 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: android update project -p ../com_actionbarsherlock prebuild:
- android update project -p ../com_actionbarsherlock
rm: [] rm: []
scandelete: [] scandelete: []
scanignore: [] scanignore: []
@ -386,7 +389,8 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: android update project -p ../com_actionbarsherlock prebuild:
- android update project -p ../com_actionbarsherlock
rm: [] rm: []
scandelete: [] scandelete: []
scanignore: [] scanignore: []
@ -421,7 +425,9 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: android update project -p ../com_actionbarsherlock && rm -rf libs/armeabi/* prebuild:
- android update project -p ../com_actionbarsherlock
- rm -rf libs/armeabi/*
rm: [] rm: []
scandelete: [] scandelete: []
scanignore: [] scanignore: []
@ -455,8 +461,10 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: android update project -p ../com_actionbarsherlock && rm -rf libs/armeabi/* prebuild:
&& rm libs/android-support-v4.jar - android update project -p ../com_actionbarsherlock
- rm -rf libs/armeabi/*
- rm libs/android-support-v4.jar
rm: [] rm: []
scandelete: [] scandelete: []
scanignore: [] scanignore: []
@ -490,7 +498,9 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: android update project -p ../com_actionbarsherlock && rm -rf libs/armeabi/* prebuild:
- android update project -p ../com_actionbarsherlock
- rm -rf libs/armeabi/*
rm: [] rm: []
scandelete: [] scandelete: []
scanignore: [] scanignore: []
@ -524,8 +534,10 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: android update project -p ../com_actionbarsherlock && rm -rf libs/armeabi/* prebuild:
&& android update project -p ../org_donations - android update project -p ../com_actionbarsherlock
- rm -rf libs/armeabi/*
- android update project -p ../org_donations
rm: [] rm: []
scandelete: [] scandelete: []
scanignore: [] scanignore: []
@ -559,8 +571,10 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: android update project -p ../com_actionbarsherlock && rm -rf libs/armeabi/* prebuild:
&& android update project -p ../org_donations - android update project -p ../com_actionbarsherlock
- rm -rf libs/armeabi/*
- android update project -p ../org_donations
rm: [] rm: []
scandelete: [] scandelete: []
scanignore: [] scanignore: []
@ -594,8 +608,10 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: android update project -p ../com_actionbarsherlock && rm -rf libs/armeabi/* prebuild:
&& android update project -p ../org_donations - android update project -p ../com_actionbarsherlock
- rm -rf libs/armeabi/*
- android update project -p ../org_donations
rm: [] rm: []
scandelete: [] scandelete: []
scanignore: [] scanignore: []
@ -629,8 +645,10 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: android update project -p ../com_actionbarsherlock && rm -rf libs/armeabi/* prebuild:
&& android update project -p ../org_donations - android update project -p ../com_actionbarsherlock
- rm -rf libs/armeabi/*
- android update project -p ../org_donations
rm: [] rm: []
scandelete: [] scandelete: []
scanignore: [] scanignore: []
@ -662,8 +680,9 @@ Builds:
forceversion: false forceversion: false
gradle: [] gradle: []
gradleprops: [] gradleprops: []
init: rm android-libs/Donations/custom_rules.xml && git clone https://github.com/dschuermann/HtmlSpanner init:
android-libs/HtmlSpanner - rm android-libs/Donations/custom_rules.xml
- git clone https://github.com/dschuermann/HtmlSpanner android-libs/HtmlSpanner
maven: false maven: false
ndk: null ndk: null
novcheck: false novcheck: false
@ -671,12 +690,13 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: rm -rf ../update_zip libs/root-commands-1.2.jar libs/htmlspanner-0.2-fork.jar prebuild:
&& cp -f libs/htmlcleaner-2.2.jar android-libs/HtmlSpanner/htmlspanner/libs/ && - rm -rf ../update_zip libs/root-commands-1.2.jar libs/htmlspanner-0.2-fork.jar
echo "android.library.reference.3=$$RootCommands$$" >> project.properties && echo - cp -f libs/htmlcleaner-2.2.jar android-libs/HtmlSpanner/htmlspanner/libs/
"android.library.reference.4=android-libs/HtmlSpanner/htmlspanner" >> project.properties - echo "android.library.reference.3=$$RootCommands$$" >> project.properties
&& find . -type f -print0 | xargs -0 sed -i 's/org.rootcommands/org.sufficientlysecure.rootcommands/g' - echo "android.library.reference.4=android-libs/HtmlSpanner/htmlspanner" >> project.properties
&& cp android-libs/Donations/ant-templates/other/DonationsConfig.java android-libs/Donations/src/org/donations/ - find . -type f -print0 | xargs -0 sed -i 's/org.rootcommands/org.sufficientlysecure.rootcommands/g'
- cp android-libs/Donations/ant-templates/other/DonationsConfig.java android-libs/Donations/src/org/donations/
rm: [] rm: []
scandelete: [] scandelete: []
scanignore: [] scanignore: []
@ -709,8 +729,9 @@ Builds:
forceversion: false forceversion: false
gradle: [] gradle: []
gradleprops: [] gradleprops: []
init: rm android-libs/Donations/custom_rules.xml && git clone https://github.com/dschuermann/HtmlSpanner init:
android-libs/HtmlSpanner - rm android-libs/Donations/custom_rules.xml
- git clone https://github.com/dschuermann/HtmlSpanner android-libs/HtmlSpanner
maven: false maven: false
ndk: null ndk: null
novcheck: false novcheck: false
@ -718,12 +739,13 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: rm -rf ../update_zip libs/root-commands-1.2.jar libs/htmlspanner-0.2-fork.jar prebuild:
&& cp -f libs/htmlcleaner-2.2.jar android-libs/HtmlSpanner/htmlspanner/libs/ && - rm -rf ../update_zip libs/root-commands-1.2.jar libs/htmlspanner-0.2-fork.jar
echo "android.library.reference.3=$$RootCommands$$" >> project.properties && echo - cp -f libs/htmlcleaner-2.2.jar android-libs/HtmlSpanner/htmlspanner/libs/
"android.library.reference.4=android-libs/HtmlSpanner/htmlspanner" >> project.properties - echo "android.library.reference.3=$$RootCommands$$" >> project.properties
&& find . -type f -print0 | xargs -0 sed -i 's/org.rootcommands/org.sufficientlysecure.rootcommands/g' - echo "android.library.reference.4=android-libs/HtmlSpanner/htmlspanner" >> project.properties
&& cp android-libs/Donations/ant-templates/other/DonationsConfig.java android-libs/Donations/src/org/donations/ - find . -type f -print0 | xargs -0 sed -i 's/org.rootcommands/org.sufficientlysecure.rootcommands/g'
- cp android-libs/Donations/ant-templates/other/DonationsConfig.java android-libs/Donations/src/org/donations/
rm: [] rm: []
scandelete: [] scandelete: []
scanignore: [] scanignore: []

View File

@ -32,13 +32,27 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: touch signing.properties && pushd $$GradleWitness$$ && gradle jar && popd prebuild:
&& cp $$GradleWitness$$/build/libs/GradleWitness.jar libs/gradle-witness.jar && - touch signing.properties
sed -i -e '20,22d' build.gradle && pushd $$PreferenceFragment$$ && gradle uploadArchives - pushd $$GradleWitness$$
&& popd && sed -i -e '/5470f5872514a6226fa1fc6f4e000991f38805691c534cf0bd2778911fc773ad/d' - gradle jar
build.gradle && mkdir smil && pushd smil && wget -c http://www.w3.org/TR/smil-boston-dom/java-binding.zip - popd
&& unzip java-binding.zip && popd && cp -fR smil/java/org src/ && rm -fR smil - cp $$GradleWitness$$/build/libs/GradleWitness.jar libs/gradle-witness.jar
&& sed -i -e '/org.w3c.smil/d' build.gradle && cp -fR $$AospMms$$/src/org src/ - sed -i -e '20,22d' build.gradle
- pushd $$PreferenceFragment$$
- gradle uploadArchives
- popd
- sed -i -e '/5470f5872514a6226fa1fc6f4e000991f38805691c534cf0bd2778911fc773ad/d'
build.gradle
- mkdir smil
- pushd smil
- wget -c http://www.w3.org/TR/smil-boston-dom/java-binding.zip
- unzip java-binding.zip
- popd
- cp -fR smil/java/org src/
- rm -fR smil
- sed -i -e '/org.w3c.smil/d' build.gradle
- cp -fR $$AospMms$$/src/org src/
rm: rm:
- libs/* - libs/*
scandelete: [] scandelete: []
@ -78,8 +92,12 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: touch signing.properties && pushd $$GradleWitness$$ && gradle jar && popd prebuild:
&& cp $$GradleWitness$$/build/libs/GradleWitness.jar libs/gradle-witness.jar - touch signing.properties
- pushd $$GradleWitness$$
- gradle jar
- popd
- cp $$GradleWitness$$/build/libs/GradleWitness.jar libs/gradle-witness.jar
rm: rm:
- libs/*.jar - libs/*.jar
scandelete: [] scandelete: []
@ -116,8 +134,11 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: touch signing.properties && ./build-witness.sh && rm -rf libs/gradle-witness/build prebuild:
&& echo "org.gradle.jvmargs=-Xms512m -Xmx512m -XX:MaxPermSize=512m" >> gradle.properties - touch signing.properties
- ./build-witness.sh
- rm -rf libs/gradle-witness/build
- echo "org.gradle.jvmargs=-Xms512m -Xmx512m -XX:MaxPermSize=512m" >> gradle.properties
rm: rm:
- libs/*.jar - libs/*.jar
scandelete: [] scandelete: []
@ -153,8 +174,11 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: touch signing.properties && ./build-witness.sh && rm -rf libs/gradle-witness/build prebuild:
&& echo "org.gradle.jvmargs=-Xms512m -Xmx512m -XX:MaxPermSize=512m" >> gradle.properties - touch signing.properties
- ./build-witness.sh
- rm -rf libs/gradle-witness/build
- echo "org.gradle.jvmargs=-Xms512m -Xmx512m -XX:MaxPermSize=512m" >> gradle.properties
rm: rm:
- libs/*.jar - libs/*.jar
scandelete: [] scandelete: []
@ -190,7 +214,10 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: touch signing.properties && ./scripts/build-witness.sh && rm -rf libs/gradle-witness/build prebuild:
- touch signing.properties
- ./scripts/build-witness.sh
- rm -rf libs/gradle-witness/build
rm: rm:
- libs/*.jar - libs/*.jar
scandelete: [] scandelete: []
@ -226,7 +253,10 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: touch signing.properties && ./scripts/build-witness.sh && rm -rf libs/gradle-witness/build prebuild:
- touch signing.properties
- ./scripts/build-witness.sh
- rm -rf libs/gradle-witness/build
rm: rm:
- libs/*.jar - libs/*.jar
scandelete: [] scandelete: []
@ -262,7 +292,10 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: touch signing.properties && ./scripts/build-witness.sh && rm -rf libs/gradle-witness/build prebuild:
- touch signing.properties
- ./scripts/build-witness.sh
- rm -rf libs/gradle-witness/build
rm: rm:
- libs/*.jar - libs/*.jar
scandelete: [] scandelete: []
@ -298,7 +331,10 @@ Builds:
output: null output: null
patch: [] patch: []
preassemble: [] preassemble: []
prebuild: touch signing.properties && ./scripts/build-witness.sh && rm -rf libs/gradle-witness/build prebuild:
- touch signing.properties
- ./scripts/build-witness.sh
- rm -rf libs/gradle-witness/build
rm: rm:
- libs/*.jar - libs/*.jar
scandelete: [] scandelete: []

File diff suppressed because it is too large Load Diff