[enh] don't reprocess github app if the revision is the same
This commit is contained in:
@@ -60,6 +60,13 @@ print(":: Building %s list..." % list_name)
|
|||||||
if not args.output:
|
if not args.output:
|
||||||
args.output = '%s-build.json' % list_name
|
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
|
# GitHub credentials
|
||||||
if args.github:
|
if args.github:
|
||||||
token = (args.github.split(':')[0], args.github.split(':')[1])
|
token = (args.github.split(':')[0], args.github.split(':')[1])
|
||||||
@@ -78,6 +85,11 @@ for app, info in apps_list.items():
|
|||||||
manifest = {}
|
manifest = {}
|
||||||
timestamp = None
|
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
|
## Hosted on GitHub
|
||||||
github_repo = re_github_repo.match(app_url)
|
github_repo = re_github_repo.match(app_url)
|
||||||
if github_repo:
|
if github_repo:
|
||||||
|
|||||||
Reference in New Issue
Block a user