1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

[enh] don't reprocess github app if the revision is the same

This commit is contained in:
Laurent Peuch 2016-03-31 14:58:35 +02:00
parent 7847025b5a
commit 360e73f711

View file

@ -60,6 +60,13 @@ print(":: Building %s list..." % list_name)
if not args.output:
args.output = '%s-build.json' % list_name
already_built_file = {}
if os.path.exists(args.output):
try:
already_built_file = json.load(open(args.output))
except Exception as e:
print("Error while trying to load already built file: %s" % e)
# GitHub credentials
if args.github:
token = (args.github.split(':')[0], args.github.split(':')[1])
@ -78,6 +85,11 @@ for app, info in apps_list.items():
manifest = {}
timestamp = None
if already_built_file.get(app, {}).get("git", {}).get("revision", None) == app_rev:
print("%s[%s] is already up to date in target output, ignore" % (app, app_rev))
result_dict[app] = already_built_file[app]
continue
## Hosted on GitHub
github_repo = re_github_repo.match(app_url)
if github_repo: