mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
Added ability to build from svn without checking out the entire repo
This commit is contained in:
parent
a81e48dad0
commit
cae8bd1546
18
README
18
README
@ -74,6 +74,13 @@ values are:
|
|||||||
|
|
||||||
The repository location. Usually a git: or svn: URL.
|
The repository location. Usually a git: or svn: URL.
|
||||||
|
|
||||||
|
Normally the repository is checked out once for the application, then moved
|
||||||
|
to a particular revision/commit/tag for each build version. For an SVN
|
||||||
|
repository though, this behaviour can be changed by appending a * to the
|
||||||
|
repository URL - in this case the repository is checked out once per build
|
||||||
|
version, with the subdir parameter in place of the *. This can be beneficial
|
||||||
|
when dealing with very large SVN repositories.
|
||||||
|
|
||||||
==Build Version==
|
==Build Version==
|
||||||
|
|
||||||
Any number of these fields can be present, each specifying a version to
|
Any number of these fields can be present, each specifying a version to
|
||||||
@ -90,10 +97,13 @@ In addition to the three, always required, parameters described above,
|
|||||||
further parameters can be added (in name=value format) to apply further
|
further parameters can be added (in name=value format) to apply further
|
||||||
configuration to the build. These are:
|
configuration to the build. These are:
|
||||||
|
|
||||||
subdir=<path> - specifies to build from a subdirectory of the checked out
|
subdir=<path> - Specifies to build from a subdirectory of the checked out
|
||||||
source code
|
source code. Normally this directory is changed to before
|
||||||
oldsdkloc=yes - the sdk location in the repo is in an old format
|
building, but there is a special case for SVN repositories
|
||||||
target=<target> - specifies a particular SDK target, when the source doesn't
|
where the URL is specified with a * at the end. See the
|
||||||
|
documentation for the Repo field for more information.
|
||||||
|
oldsdkloc=yes - The sdk location in the repo is in an old format
|
||||||
|
target=<target> - Specifies a particular SDK target, when the source doesn't
|
||||||
|
|
||||||
Another example, using extra parameters:
|
Another example, using extra parameters:
|
||||||
|
|
||||||
|
9
build.py
9
build.py
@ -68,6 +68,7 @@ for app in apps:
|
|||||||
print "Git clone failed"
|
print "Git clone failed"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
elif app['repotype'] == 'svn':
|
elif app['repotype'] == 'svn':
|
||||||
|
if not app['repo'].endswith("*"):
|
||||||
if subprocess.call(['svn', 'checkout', app['repo'], build_dir]) != 0:
|
if subprocess.call(['svn', 'checkout', app['repo'], build_dir]) != 0:
|
||||||
print "Svn checkout failed"
|
print "Svn checkout failed"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -81,6 +82,14 @@ for app in apps:
|
|||||||
|
|
||||||
# Optionally, the actual app source can be in a subdirectory...
|
# Optionally, the actual app source can be in a subdirectory...
|
||||||
if thisbuild.has_key('subdir'):
|
if thisbuild.has_key('subdir'):
|
||||||
|
if app['repotype'] == 'svn' and app['repo'].endswith("*"):
|
||||||
|
root_dir = build_dir
|
||||||
|
if subprocess.call(['svn', 'checkout',
|
||||||
|
app['repo'][:-1] + thisbuild['subdir'],
|
||||||
|
build_dir]) != 0:
|
||||||
|
print "Svn checkout failed"
|
||||||
|
sys.exit(1)
|
||||||
|
else:
|
||||||
root_dir = os.path.join(build_dir, thisbuild['subdir'])
|
root_dir = os.path.join(build_dir, thisbuild['subdir'])
|
||||||
else:
|
else:
|
||||||
root_dir = build_dir
|
root_dir = build_dir
|
||||||
|
Loading…
Reference in New Issue
Block a user