summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/combo-layer12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer
index f3480dcf5a..e2b180dc7e 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -230,6 +230,18 @@ def action_update(conf, args):
action_apply_patch(conf, args)
runcmd("rm -rf %s" % patch_dir)
+ # Step 7: commit the updated config file if it's being tracked
+ relpath = os.path.relpath(conf.conffile)
+ try:
+ output = runcmd("git status --porcelain %s" % relpath)
+ except:
+ # Outside the repository
+ output = None
+ if output:
+ logger.info("Committing updated configuration file")
+ if output.lstrip().startswith("M"):
+ runcmd('git commit -m "Automatic commit to update last_revision" %s' % relpath)
+
def action_apply_patch(conf, args):
"""
apply the generated patch list to combo repo