Skip to content
This repository has been archived by the owner on Jun 25, 2022. It is now read-only.

Commit

Permalink
read version from file
Browse files Browse the repository at this point in the history
  • Loading branch information
pathmann committed May 18, 2017
1 parent 42e6c09 commit 7aa02e4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tools/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
Name = pyTSon
Type = Plugin
Author = Thomas \\"PLuS\\" Pathmann
Version = 1.2.1
Version = %s
Platforms = %s
Description = "pyTSon - A python plugin to enhance the TS3 client with python\
scripts"
Expand All @@ -168,6 +168,14 @@ def writeFiles(root, files, tozip):


def main(root, pythondir, outdir, arches, buildbase, update):
verpath = os.path.join(root, "VERSION")
if not os.path.isfile(verpath):
print("Could not find VERSION file in rootdir")
sys.exit(1)

with open(verpath, "r") as f:
ver = f.readline()

for a in arches:
if update:
shutil.copyfile(os.path.join(outdir, "pyTSon_%s.base" % a),
Expand All @@ -194,7 +202,7 @@ def main(root, pythondir, outdir, arches, buildbase, update):
writeFiles(pythondir, PYTHONFILES[a], zipout)

if not buildbase:
zipout.writestr("package.ini", INIBASE % a)
zipout.writestr("package.ini", INIBASE % (ver, a))

zipout.close()

Expand Down

0 comments on commit 7aa02e4

Please sign in to comment.