wscript: fix git version generation for tarballs (again)
This commit is contained in:
parent
109b5372ea
commit
c0e7f12e4b
6
wscript
6
wscript
|
@ -248,14 +248,14 @@ def configure(conf):
|
||||||
|
|
||||||
def git_ver(self):
|
def git_ver(self):
|
||||||
if type(self) == Scripting.Dist:
|
if type(self) == Scripting.Dist:
|
||||||
header = "./gitversion.h"
|
header = "./version.h"
|
||||||
bld = self
|
bld = self
|
||||||
else:
|
else:
|
||||||
bld = self.generator.bld
|
bld = self.generator.bld
|
||||||
header = self.outputs[0].abspath()
|
header = self.outputs[0].abspath()
|
||||||
if os.access('./gitversion.h', os.R_OK):
|
if os.access('./version.h', os.R_OK):
|
||||||
#header = os.path.join(os.getcwd(), out, "version.h")
|
#header = os.path.join(os.getcwd(), out, "version.h")
|
||||||
shutil.copy('./gitversion.h', header)
|
shutil.copy('./version.h', header)
|
||||||
data = open(header).read()
|
data = open(header).read()
|
||||||
m = re.match(r'^#define GIT_VERSION "([^"]*)"$', data)
|
m = re.match(r'^#define GIT_VERSION "([^"]*)"$', data)
|
||||||
if m != None:
|
if m != None:
|
||||||
|
|
Loading…
Reference in New Issue