summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bumpspecfile.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/bumpspecfile.py b/scripts/bumpspecfile.py
index 478e82871..bc02ab300 100755
--- a/scripts/bumpspecfile.py
+++ b/scripts/bumpspecfile.py
@@ -1,6 +1,7 @@
#!/usr/bin/python
#
-# Needs $GIT_COMMITTER_NAME and $GIT_COMMITTER_EMAIL set.
+# Uses git config options user.name and user.email, falls
+# back to env vars $GIT_COMMITTER_NAME and $GIT_COMMITTER_EMAIL
#
import re
import sys
@@ -44,8 +45,12 @@ class Specfile:
self.vr = " "+ver+'-'+nextrel
def addChangelogEntry(self,entry):
- user = os.environ.get("GIT_COMMITTER_NAME","unknown")
- email = os.environ.get("GIT_COMMITTER_EMAIL","unknown")
+ user = os.popen("git config --get user.name").read().rstrip()
+ if (user == ""):
+ user = os.environ.get("GIT_COMMITTER_NAME","Unknown")
+ email = os.popen("git config --get user.email").read().rstrip()
+ if (email == ""):
+ email = os.environ.get("GIT_COMMITTER_EMAIL","unknown")
if (email == "unknown"):
email = os.environ.get("USER","unknown")+"@fedoraproject.org"
changematch=re.compile(r"^%changelog")