Get the live version from version.py instead of guessing for mac build scripts.
This commit is contained in:
parent
5a107a3341
commit
3531b3f562
3 changed files with 34 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
## Cleanup
|
||||
rm -rf build/ dist/
|
||||
|
@ -13,7 +13,7 @@ touch dist/Pesterchum.app/Contents/Resources/qt.conf
|
|||
find dist/Pesterchum.app -iname "*_debug" -exec rm -f '{}' \;
|
||||
|
||||
## Create a dmg file to hold everything
|
||||
VERSION="3.41.2 Beta 5"
|
||||
VERSION=$(python version.py) #"3.41.2 Beta 5"
|
||||
SIZE=2000
|
||||
name="Pesterchum"
|
||||
title="${name} ${VERSION}"
|
||||
|
|
|
@ -6,13 +6,14 @@ Usage:
|
|||
"""
|
||||
|
||||
from setuptools import setup
|
||||
from version import lexVersion
|
||||
|
||||
APP = ['pesterchum.py']
|
||||
#DATA_FILES = ['pesterchum.js', 'profiles', 'themes', 'smilies', 'logs']
|
||||
DATA_FILES = ['quirks', 'themes', 'smilies']
|
||||
# TODO: Grep this version out of version.py
|
||||
SHORT_VERSION = '3.41.2B5'
|
||||
LONG_VERSION = '3.41.2 Beta 5 Bleeding Edge'
|
||||
SHORT_VERSION = lexVersion(True) #'3.41.2B5'
|
||||
LONG_VERSION = lexVersion() #'3.41.2 Beta 5 Bleeding Edge'
|
||||
OPTIONS = {
|
||||
'argv_emulation': False,
|
||||
'prefer_ppc': True,
|
||||
|
|
30
version.py
30
version.py
|
@ -9,7 +9,7 @@ USER_TYPE = "edge"
|
|||
# edge - new git stuff. bleeding edge, do not try at home (kiooeht version)
|
||||
|
||||
_pcMajor = "3.41"
|
||||
_pcMinor = "0"
|
||||
_pcMinor = "2"
|
||||
_pcStatus = "B" # A = alpha
|
||||
# B = beta
|
||||
# RC = release candidate
|
||||
|
@ -24,6 +24,34 @@ def pcVerCalc():
|
|||
else:
|
||||
_pcVersion = "%s.%s.%s" % (_pcMajor, _pcMinor, _pcRevision)
|
||||
|
||||
def lexVersion(short=False):
|
||||
if not _pcStatus:
|
||||
return "%s.%s" % (_pcMajor, _pcMinor)
|
||||
|
||||
utype = ""
|
||||
if USER_TYPE == "edge":
|
||||
utype = "E"
|
||||
|
||||
if short:
|
||||
return "%s.%s%s%s%s" % (_pcMajor, _pcMinor, _pcStatus, _pcRevision, utype);
|
||||
|
||||
stype = ""
|
||||
if _pcStatus == "A":
|
||||
stype = "Alpha"
|
||||
elif _pcStatus == "B":
|
||||
stype = "Beta"
|
||||
elif _pcStatus == "RC":
|
||||
stype = "Release Candidate"
|
||||
|
||||
if utype == "E":
|
||||
utype = " Bleeding Edge"
|
||||
|
||||
return "%s.%s %s %s%s" % (_pcMajor, _pcMinor, stype, _pcRevision, utype);
|
||||
|
||||
# Naughty I know, but it lets me grab it from the bash script.
|
||||
if __name__ == "__main__":
|
||||
print lexVersion()
|
||||
|
||||
def verStrToNum(ver):
|
||||
w = re.match("(\d+\.?\d+)\.(\d+)-?([A-Za-z]{0,2})\.?(\d*):(\S+)", ver)
|
||||
if not w:
|
||||
|
|
Loading…
Reference in a new issue