mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-09 00:40:11 +01:00
Allow for subdirectories being present only in relevant commit
This commit is contained in:
parent
e44406f751
commit
2f182febfb
@ -555,8 +555,6 @@ def prepare_source(vcs, app, build, build_dir, sdk_path, ndk_path, javacc_path,
|
||||
# Optionally, the actual app source can be in a subdirectory...
|
||||
if build.has_key('subdir'):
|
||||
root_dir = os.path.join(build_dir, build['subdir'])
|
||||
if not os.path.exists(root_dir):
|
||||
raise BuildException('Missing subdir ' + root_dir)
|
||||
else:
|
||||
root_dir = build_dir
|
||||
|
||||
@ -564,6 +562,11 @@ def prepare_source(vcs, app, build, build_dir, sdk_path, ndk_path, javacc_path,
|
||||
print "Resetting repository to " + build['commit']
|
||||
vcs.reset(build['commit'])
|
||||
|
||||
# Check that a subdir (if we're using one) exists. This has to happen
|
||||
# after the checkout, since it might not exist elsewhere...
|
||||
if not os.path.exists(root_dir):
|
||||
raise BuildException('Missing subdir ' + root_dir)
|
||||
|
||||
# Initialise submodules if requred...
|
||||
if build.get('submodules', 'no') == 'yes':
|
||||
vcs.initsubmodules()
|
||||
|
Loading…
Reference in New Issue
Block a user