]> scripts.mit.edu Git - wizard.git/blob - wizard/git.py
Rewrite parametrize to use new parametrizeWithVars
[wizard.git] / wizard / git.py
1 """
2 Helper functions for dealing with Git.
3 """
4
5 from wizard import shell, util
6
7 def describe():
8     """Finds the output of git describe --tags of the current directory."""
9     return shell.safeCall("git", "describe", "--tags", strip=True)
10
11 def commit_configure():
12     """
13     Performs a commit of changes performed during configuration of an install
14     with an appropriate logfile message.
15     """
16     message = "Autoinstall configuration of %s locker.\n\n%s" % (util.get_dir_owner(), util.get_git_footer())
17     util.set_git_env()
18     try:
19         message += "\nConfigured-by: " + util.get_operator_git()
20     except util.NoOperatorInfo:
21         pass
22     shell.call("git", "commit", "--allow-empty", "-a", "-m", message)