bundle: remove git sha from the Info.plist version

Fixes #2677
This commit is contained in:
Stefano Pigozzi 2016-01-05 12:24:50 +01:00
parent d0cd7fa31b
commit 0015afd059
1 changed files with 10 additions and 1 deletions

View File

@ -39,8 +39,17 @@ def apply_plist_template(plist_file, version):
for line in fileinput.input(plist_file, inplace=1): for line in fileinput.input(plist_file, inplace=1):
print (line.rstrip().replace('${VERSION}', version)) print (line.rstrip().replace('${VERSION}', version))
def bundle_version():
if os.path.exists('VERSION'):
x = open('VERSION')
version = x.read()
x.close()
else:
version = sh("./version.sh").strip()
return version
def main(): def main():
version = sh("./version.sh").strip() version = bundle_version().rstrip()
usage = "usage: %prog [options] arg" usage = "usage: %prog [options] arg"
parser = OptionParser(usage) parser = OptionParser(usage)