mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-09 00:40:11 +01:00
A couple of minor import improvements
This commit is contained in:
parent
9571c792db
commit
c1020ca38f
@ -98,6 +98,8 @@ def main():
|
|||||||
help="Path to main android project subdirectory, if not in root.")
|
help="Path to main android project subdirectory, if not in root.")
|
||||||
parser.add_option("-r", "--repo", default=None,
|
parser.add_option("-r", "--repo", default=None,
|
||||||
help="Allows a different repo to be specified for a multi-repo google code project")
|
help="Allows a different repo to be specified for a multi-repo google code project")
|
||||||
|
parser.add_option("--rev", default=None,
|
||||||
|
help="Allows a different revision (or git branch) to be specified for the initial import")
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
if not options.url:
|
if not options.url:
|
||||||
@ -218,7 +220,7 @@ def main():
|
|||||||
if os.path.exists(src_dir):
|
if os.path.exists(src_dir):
|
||||||
shutil.rmtree(src_dir)
|
shutil.rmtree(src_dir)
|
||||||
vcs = common.getvcs(repotype, repo, src_dir, sdk_path)
|
vcs = common.getvcs(repotype, repo, src_dir, sdk_path)
|
||||||
vcs.gotorevision(None)
|
vcs.gotorevision(options.rev)
|
||||||
if options.subdir:
|
if options.subdir:
|
||||||
root_dir = os.path.join(src_dir, options.subdir)
|
root_dir = os.path.join(src_dir, options.subdir)
|
||||||
else:
|
else:
|
||||||
@ -236,11 +238,9 @@ def main():
|
|||||||
print "Couldn't find package ID"
|
print "Couldn't find package ID"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
if not version:
|
if not version:
|
||||||
print "Couldn't find latest version name"
|
print "WARNING: Couldn't find latest version name"
|
||||||
sys.exit(1)
|
|
||||||
if not vercode:
|
if not vercode:
|
||||||
print "Couldn't find latest version code"
|
print "WARNING: Couldn't find latest version code"
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
# Make sure it's actually new...
|
# Make sure it's actually new...
|
||||||
for app in apps:
|
for app in apps:
|
||||||
@ -262,16 +262,15 @@ def main():
|
|||||||
|
|
||||||
# Create a build line...
|
# Create a build line...
|
||||||
build = {}
|
build = {}
|
||||||
build['version'] = version
|
build['version'] = version if version else '?'
|
||||||
build['vercode'] = vercode
|
build['vercode'] = vercode if vercode else '?'
|
||||||
build['commit'] = '?'
|
build['commit'] = '?'
|
||||||
|
build['disable'] = 'Generated by import.py - check/set version fields and commit id'
|
||||||
if options.subdir:
|
if options.subdir:
|
||||||
build['subdir'] = options.subdir
|
build['subdir'] = options.subdir
|
||||||
if os.path.exists(os.path.join(root_dir, 'jni')):
|
if os.path.exists(os.path.join(root_dir, 'jni')):
|
||||||
build['buildjni'] = 'yes'
|
build['buildjni'] = 'yes'
|
||||||
app['builds'].append(build)
|
app['builds'].append(build)
|
||||||
app['comments'].append(('build:' + version,
|
|
||||||
"#Generated by import.py - check this is the right version, and find the right commit!"))
|
|
||||||
|
|
||||||
# Keep the repo directory to save bandwidth...
|
# Keep the repo directory to save bandwidth...
|
||||||
if not os.path.exists('build'):
|
if not os.path.exists('build'):
|
||||||
|
Loading…
Reference in New Issue
Block a user