try:
    from localbuildsettings import defaultBuild
except ImportError:
    defaultBuild = None


buildName = defaultBuild

# build name from command line
if len(sys.argv) == 2:	# argv[0] = program, argv[1] = buildname, len=2
    buildName = sys.argv[1]


if buildName is None or not buildName in buildSettings:
    print ("Usage: build.py buildname")
    print (" available build names: %s" % ', '.join(buildSettings.keys()))
    sys.exit(1)

settings = buildSettings[buildName]

# set up vars used for replacements

utcTime = time.gmtime()
buildDate = time.strftime('%Y-%m-%d-%H%M%S',utcTime)
# userscripts have specific specifications for version numbers - the above date format doesn't match
dateTimeVersion = time.strftime('%Y%m%d.%H%M%S',utcTime)

# extract required values from the settings entry
resourceUrlBase = settings.get('resourceUrlBase')
distUrlBase = settings.get('distUrlBase')
buildMobile = settings.get('buildMobile')
Ejemplo n.º 2
0
# load default build
try:
    from localbuildsettings import defaultBuild
except ImportError:
    defaultBuild = None

buildName = defaultBuild

# build name from command line
if len(sys.argv) == 2:  # argv[0] = program, argv[1] = buildname, len=2
    buildName = sys.argv[1]

if buildName is None or not buildName in buildSettings:
    print("Usage: build.py buildname")
    print(" available build names: %s" % ', '.join(buildSettings.keys()))
    sys.exit(1)

settings = buildSettings[buildName]

# set up vars used for replacements

utcTime = time.gmtime()
buildDate = time.strftime('%Y-%m-%d-%H%M%S', utcTime)
# userscripts have specific specifications for version numbers - the above date format doesn't match
dateTimeVersion = time.strftime('%Y%m%d.', utcTime) + time.strftime(
    '%H%M%S', utcTime).lstrip('0')

# extract required values from the settings entry
resourceUrlBase = settings.get('resourceUrlBase')
distUrlBase = settings.get('distUrlBase')
import time
import re
import io
import sys
import os
import shutil


# load settings file
from buildsettings import buildSettings


# build name from command line
if len(sys.argv) != 2:  # argv[0] = program, argv[1] = buildname, len=2
    print "Usage: build.py buildname"
    print " available build names:", ",".join(buildSettings.keys())
    sys.exit(1)

buildName = sys.argv[1]

settings = buildSettings[buildName]

# set up vars used for replacements

utcTime = time.gmtime()
buildDate = time.strftime("%Y-%m-%d-%H%M%S", utcTime)
# userscripts have specific specifications for version numbers - the above date format doesn't match
dateTimeVersion = time.strftime("%Y%m%d.%H%M%S", utcTime)

# extract required values from the settings entry
resourceUrlBase = settings["resourceUrlBase"]