vcs.gotorevision(None)
+ root_dir = build_dir
flavours = []
if len(app['builds']) > 0:
if app['builds'][-1]['subdir']:
- build_dir = os.path.join(build_dir, app['builds'][-1]['subdir'])
+ root_dir = os.path.join(build_dir, app['builds'][-1]['subdir'])
if app['builds'][-1]['gradle']:
flavours = app['builds'][-1]['gradle']
vcs.gotorevision(tag)
# Only process tags where the manifest exists...
- paths = common.manifest_paths(build_dir, flavours)
+ paths = common.manifest_paths(root_dir, flavours)
version, vercode, package = \
common.parse_androidmanifests(paths, app['Update Check Ignore'])
if not app_matches_packagename(app, package) or not version or not vercode:
elif repotype == 'bzr':
vcs.gotorevision(None)
+ root_dir = build_dir
flavours = []
if len(app['builds']) > 0:
if app['builds'][-1]['subdir']:
- build_dir = os.path.join(build_dir, app['builds'][-1]['subdir'])
+ root_dir = os.path.join(build_dir, app['builds'][-1]['subdir'])
if app['builds'][-1]['gradle']:
flavours = app['builds'][-1]['gradle']
- if not os.path.isdir(build_dir):
+ if not os.path.isdir(root_dir):
return (None, "Subdir '" + app['builds'][-1]['subdir'] + "'is not a valid directory")
- paths = common.manifest_paths(build_dir, flavours)
+ paths = common.manifest_paths(root_dir, flavours)
version, vercode, package = \
common.parse_androidmanifests(paths, app['Update Check Ignore'])
# Get a copy of the source so we can extract some info...
logging.info('Getting source from ' + repotype + ' repo at ' + repo)
- src_dir = os.path.join(tmp_dir, 'importer')
- if os.path.exists(src_dir):
- shutil.rmtree(src_dir)
- vcs = common.getvcs(repotype, repo, src_dir)
+ build_dir = os.path.join(tmp_dir, 'importer')
+ if os.path.exists(build_dir):
+ shutil.rmtree(build_dir)
+ vcs = common.getvcs(repotype, repo, build_dir)
vcs.gotorevision(options.rev)
- root_dir = get_subdir(src_dir)
+ root_dir = get_subdir(build_dir)
app['Repo Type'] = repotype
app['Repo'] = repo
- return root_dir, src_dir
+ return root_dir, build_dir
config = None
options = None
-def get_subdir(src_dir):
+def get_subdir(build_dir):
if options.subdir:
- return os.path.join(src_dir, options.subdir)
+ return os.path.join(build_dir, options.subdir)
- return src_dir
+ return build_dir
def main():
app['Update Check Mode'] = "Tags"
root_dir = None
- src_dir = None
+ build_dir = None
if options.url:
- root_dir, src_dir = get_metadata_from_url(app, options.url)
+ root_dir, build_dir = get_metadata_from_url(app, options.url)
elif os.path.isdir('.git'):
if options.url:
app['Web Site'] = options.url
# Keep the repo directory to save bandwidth...
if not os.path.exists('build'):
os.mkdir('build')
- if src_dir is not None:
- shutil.move(src_dir, os.path.join('build', package))
+ if build_dir is not None:
+ shutil.move(build_dir, os.path.join('build', package))
with open('build/.fdroidvcs-' + package, 'w') as f:
f.write(app['Repo Type'] + ' ' + app['Repo'])