summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xTOOLS/osxbundle.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/TOOLS/osxbundle.py b/TOOLS/osxbundle.py
index 3ad52cb003..e9ef8bc4de 100755
--- a/TOOLS/osxbundle.py
+++ b/TOOLS/osxbundle.py
@@ -39,8 +39,17 @@ def apply_plist_template(plist_file, version):
for line in fileinput.input(plist_file, inplace=1):
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():
- version = sh("./version.sh").strip()
+ version = bundle_version().rstrip()
usage = "usage: %prog [options] arg"
parser = OptionParser(usage)