X-Git-Url: https://scripts.mit.edu/gitweb/wizard.git/blobdiff_plain/927306192de34246cb2babe858262e8184a1b57d..10fea9a7ddab6a654922514b13b135772cc98a01:/wizard/git.py diff --git a/wizard/git.py b/wizard/git.py index aaea68d..965327b 100644 --- a/wizard/git.py +++ b/wizard/git.py @@ -2,9 +2,21 @@ Helper functions for dealing with Git. """ -from wizard import shell +from wizard import shell, util def describe(): """Finds the output of git describe --tags of the current directory.""" - return shell.Shell().safeCall("git", "describe", "--tags")[0].rstrip() + return shell.safeCall("git", "describe", "--tags", strip=True) +def commit_configure(): + """ + Performs a commit of changes performed during configuration of an install + with an appropriate logfile message. + """ + message = "Autoinstall configuration.\n\n%s" % util.get_git_footer() + util.set_git_env() + try: + message += "\nConfigured-by: " + util.get_operator_git() + except util.NoOperatorInfo: + pass + shell.call("git", "commit", "--allow-empty", "-a", "-m", message)