From 312d4c5f5339c61253e86cd9ce825370eb4be053 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 5 Nov 2009 16:15:04 -0500 Subject: Reverted back to the previous versioning method --- acprep | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/acprep b/acprep index 302a6368..b2c39b7c 100755 --- a/acprep +++ b/acprep @@ -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 -- cgit v1.2.3