mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 07:22:29 +03:00
Support for submodules in build process
This commit is contained in:
parent
71084958c8
commit
4a323dda66
2 changed files with 15 additions and 0 deletions
3
README
3
README
|
@ -156,6 +156,9 @@ configuration to the build. These are:
|
||||||
build. Probably not useful for any other application.
|
build. Probably not useful for any other application.
|
||||||
buildjni=yes Enables building of native code via the ndk-build script before
|
buildjni=yes Enables building of native code via the ndk-build script before
|
||||||
doing the main ant build.
|
doing the main ant build.
|
||||||
|
submodules=yes Use if the project (git only) has submodules - causes git
|
||||||
|
submodule init and update to be executed after the source is
|
||||||
|
cloned.
|
||||||
|
|
||||||
Another example, using extra parameters:
|
Another example, using extra parameters:
|
||||||
|
|
||||||
|
|
12
build.py
12
build.py
|
@ -176,6 +176,18 @@ for app in apps:
|
||||||
print "Invalid repo type " + app['repotype']
|
print "Invalid repo type " + app['repotype']
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
# Initialise submodules if requred...
|
||||||
|
if (thisbuild.has_key('submodules') and
|
||||||
|
thisbuild['submodules'] == "yes"):
|
||||||
|
if subprocess.call(['git', 'submodule', 'init'],
|
||||||
|
cwd=build_dir) != 0:
|
||||||
|
print "Git submodule init failed"
|
||||||
|
sys.exit(1)
|
||||||
|
if subprocess.call(['git', 'submodule', 'update'],
|
||||||
|
cwd=build_dir) != 0:
|
||||||
|
print "Git submodule update failed"
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
# Generate (or update) the ant build file, build.xml...
|
# Generate (or update) the ant build file, build.xml...
|
||||||
if (not thisbuild.has_key('update')) or thisbuild['update'] == 'yes':
|
if (not thisbuild.has_key('update')) or thisbuild['update'] == 'yes':
|
||||||
parms = ['android','update','project','-p','.']
|
parms = ['android','update','project','-p','.']
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue