diff options
-rwxr-xr-x | acprep | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -385,14 +385,14 @@ class PrepareBuild(CommandLineApp): def current_version(self): if not self.current_ver: if exists('.git') and isdir('.git'): - date = self.get_stdout('git', 'log', '--format=%ci', '-1', 'HEAD') - date = re.sub(" [-+][0-9][0-9][0-9][0-9]$", "", date) - when = datetime.datetime.strptime(date, "%Y-%m-%d %H:%M:%S") - self.current_ver = when.strftime("%Y%m%d_%H%M%S") - commit = self.get_stdout('git', 'log', '--format=%h', 'HEAD^..HEAD') - self.current_ver += "_" + commit - #tag = self.get_stdout('git', 'describe', '--all', '--long') - #self.current_ver = re.sub('heads/', '', tag) + #date = self.get_stdout('git', 'log', '--format=%ci', '-1', 'HEAD') + #date = re.sub(" [-+][0-9][0-9][0-9][0-9]$", "", date) + #when = datetime.datetime.strptime(date, "%Y-%m-%d %H:%M:%S") + #self.current_ver = when.strftime("%Y%m%d_%H%M%S") + #commit = self.get_stdout('git', 'log', '--format=%h', 'HEAD^..HEAD') + #self.current_ver += "_" + commit + tag = self.get_stdout('git', 'describe', '--all', '--long') + self.current_ver = re.sub('heads/', '', tag) else: self.current_ver = "3.0a" return self.current_ver |