Example #1
0
def version_summary(cmakeName):
    import sys
    import build_number
    buildNum = build_number.todays_build()

    # Get the Doomsday version. We can use some of this information.
    find_version(True)
    
    major, minor, revision, name, reltype = parse_cmake_for_version(cmakeName)
    if not reltype: reltype = DOOMSDAY_RELEASE_TYPE
    
    return "%s.%s.%s %s %s %s,%s,%s,%s" % (major, minor, revision, buildNum, reltype,
                                           major, minor, revision, buildNum)
def version_summary(headerName):
    import sys
    import build_number
    buildNum = build_number.todays_build()

    # Get the Doomsday version. We can use some of this information.
    find_version(True)
    
    major, minor, revision, name, reltype = parse_header_for_version(headerName)
    if not reltype: reltype = DOOMSDAY_RELEASE_TYPE
    
    return "%s.%s.%s %s %s %s,%s,%s,%s" % (major, minor, revision, buildNum, reltype,
                                           major, minor, revision, buildNum)
import build_version
import build_number
import builder.utils

# Configuration.
LAUNCH_DIR    = os.path.abspath(os.path.dirname(__file__))
DOOMSDAY_DIR  = os.path.abspath(os.path.join(LAUNCH_DIR, '..', 'doomsday'))
WORK_DIR      = os.path.join(LAUNCH_DIR, 'work')
OUTPUT_DIR    = os.path.join(LAUNCH_DIR, 'releases')
DOOMSDAY_VERSION_FULL       = "0.0.0-Name"
DOOMSDAY_VERSION_FULL_PLAIN = "0.0.0"
DOOMSDAY_VERSION_MAJOR      = 0
DOOMSDAY_VERSION_MINOR      = 0
DOOMSDAY_VERSION_REVISION   = 0
DOOMSDAY_RELEASE_TYPE       = "Unstable"
DOOMSDAY_BUILD_NUMBER       = build_number.todays_build()
DOOMSDAY_BUILD              = 'build' + DOOMSDAY_BUILD_NUMBER

TIMESTAMP = time.strftime('%y-%m-%d')
now = time.localtime()


def exit_with_error():
    os.chdir(LAUNCH_DIR)
    sys.exit(1)


def mkdir(n):
    try:
        os.mkdir(n)
    except OSError:
Example #4
0
    def __init__(self, build=None, latestAvailable=False):
        """Any .txt logs present in the build directory are compressed into
        a combined .txt.gz (one per package)."""

        if latestAvailable:
            # Look for the latest build.
            build = int(build_number.todays_build())
            while not os.path.exists(os.path.join(config.EVENT_DIR, 'build%i' % build)):
                build -= 1
                if build == 0: raise Exception("No builds available")
        
        if build is None:
            # Use today's build number.
            self.name = 'build' + build_number.todays_build()
            self.num = int(self.name[5:])
        elif type(build) == int:
            self.name = 'build' + str(build)
            self.num = build
        elif type(build) == str:
            if build[:5] != 'build': 
                raise Exception("Event build name must begin with 'build'")
            self.name = build
            self.num = int(build[5:])

        # Where the build is located.
        self.buildDir = os.path.join(config.EVENT_DIR, self.name)
        
        self.packages = ['doomsday', 'fmod']
        
        self.packageName = {'doomsday': 'Doomsday',
                            'fmod':     'FMOD Ex Audio Plugin'}
        
        if self.num >= 816: # Added Mac OS X 10.8.
            # Platforms:  Name                            File ext       sys_id()
            self.oses = [('Windows (x86)',                '.exe',        'win32-32bit'),
                         ('Mac OS X 10.8+ (x86_64)',      '.dmg',        'macx8-64bit'),
                         ('Mac OS X 10.6+ (x86_64/i386)', 'mac10_6.dmg', 'darwin-64bit'),
                         ('Mac OS X 10.4+ (ppc/i386)',    '32bit.dmg',   'darwin-32bit'),
                         ('Ubuntu (x86_64)',              'amd64.deb',   'linux2-64bit'),
                         ('Ubuntu (x86)',                 'i386.deb',    'linux2-32bit')]

            if self.has_version() and utils.version_cmp(self.version_base(), '1.11') >= 0:
                del self.oses[3] # no more OS X 10.4
                
        elif self.num >= 778: # Mac distribution naming was changed.
            # Platforms:  Name                            File ext     sys_id()
            self.oses = [('Windows (x86)',                '.exe',      'win32-32bit'),
                         ('Mac OS X 10.6+ (x86_64/i386)', '.dmg',      'darwin-64bit'),
                         ('Mac OS X 10.4+ (ppc/i386)',    '32bit.dmg', 'darwin-32bit'),
                         ('Ubuntu (x86_64)',              'amd64.deb', 'linux2-64bit'),
                         ('Ubuntu (x86)',                 'i386.deb',  'linux2-32bit')]

        else:
            # Platforms:  Name                            File ext     sys_id()
            self.oses = [('Windows (x86)',                '.exe',      'win32-32bit'),
                         ('Mac OS X 10.4+ (ppc/i386)',    '.dmg',      'darwin-32bit'),
                         ('Mac OS X 10.6+ (x86_64/i386)', '64bit.dmg', 'darwin-64bit'),
                         ('Ubuntu (x86)',                 'i386.deb',  'linux2-32bit'),
                         ('Ubuntu (x86_64)',              'amd64.deb', 'linux2-64bit')]            

        self.platId = {'win32-32bit':  'win-x86',
                       'darwin-32bit': 'mac10_4-x86-ppc',
                       'darwin-64bit': 'mac10_6-x86-x86_64',
                       'macx8-64bit':  'mac10_8-x86_64',
                       'linux2-32bit': 'linux-x86',
                       'linux2-64bit': 'linux-x86_64'}

        # Prepare compiler logs present in the build dir.
        self.compress_logs()
import build_version
import build_number
import builder.utils

# Configuration.
LAUNCH_DIR    = os.path.abspath(os.path.dirname(__file__))
DOOMSDAY_DIR  = os.path.abspath(os.path.join(LAUNCH_DIR, '..', 'doomsday'))
WORK_DIR      = os.path.join(LAUNCH_DIR, 'work')
OUTPUT_DIR    = os.path.join(LAUNCH_DIR, 'releases')
DOOMSDAY_VERSION_FULL       = "0.0.0-Name"
DOOMSDAY_VERSION_FULL_PLAIN = "0.0.0"
DOOMSDAY_VERSION_MAJOR      = 0
DOOMSDAY_VERSION_MINOR      = 0
DOOMSDAY_VERSION_REVISION   = 0
DOOMSDAY_RELEASE_TYPE       = "Unstable"
DOOMSDAY_BUILD_NUMBER       = build_number.todays_build()
DOOMSDAY_BUILD              = 'build' + DOOMSDAY_BUILD_NUMBER

TIMESTAMP = time.strftime('%y-%m-%d')
now = time.localtime()


def exit_with_error():
    os.chdir(LAUNCH_DIR)
    sys.exit(1)


def mkdir(n):
    try:
        os.mkdir(n)
    except OSError:
Example #6
0
def todays_build_tag():
    now = time.localtime()
    return 'build' + build_number.todays_build()
Example #7
0
    def __init__(self, build=None, latestAvailable=False):
        """Any .txt logs present in the build directory are compressed into
        a combined .txt.gz (one per package)."""

        if latestAvailable:
            # Look for the latest build.
            build = int(build_number.todays_build())
            while not os.path.exists(
                    os.path.join(config.EVENT_DIR, 'build%i' % build)):
                build -= 1
                if build == 0: raise Exception("No builds available")

        if build is None:
            # Use today's build number.
            self.name = 'build' + build_number.todays_build()
            self.num = int(self.name[5:])
        elif type(build) == int:
            self.name = 'build' + str(build)
            self.num = build
        elif type(build) == str:
            if build[:5] != 'build':
                raise Exception("Event build name must begin with 'build'")
            self.name = build
            self.num = int(build[5:])

        # Where the build is located.
        self.buildDir = os.path.join(config.EVENT_DIR, self.name)

        self.packages = [
            'doomsday', 'doomsday_app', 'doomsday_shell_app', 'fmod'
        ]

        self.packageName = {
            'doomsday': 'Doomsday',
            'doomsday_apps': 'OS X Apps',
            'doomsday_app': 'Doomsday Engine.app',
            'doomsday_shell_app': 'Doomsday Shell.app',
            'fmod': 'FMOD Ex Audio Plugin'
        }

        if self.num >= 816:  # Added Mac OS X 10.8.
            # Platforms:  Name                              File ext          sys_id()
            self.oses = [
                ('Windows (x86)', '.exe', 'win32-32bit'),
                ('OS X 10.8+ (x86_64)', ('.dmg', 'macx8.dmg'), 'macx8-64bit'),
                ('OS X 10.6+ (x86_64/i386)', ('mac10_6.dmg', 'macx6.dmg'),
                 'darwin-64bit'),
                ('OS X 10.4+ (ppc/i386)', '32bit.dmg', 'darwin-32bit'),
                ('Ubuntu (x86_64)', 'amd64.deb', 'linux2-64bit'),
                ('Ubuntu (x86)', 'i386.deb', 'linux2-32bit'),
                ('Source', '.tar.gz', 'source')
            ]

            # Remove obsolete OS X versions:
            if self.has_version():
                if utils.version_cmp(self.version_base(), '1.11') >= 0:
                    del self.oses[3]  # no more OS X 10.4
                if self.num >= 1212 and utils.version_cmp(
                        self.version_base(), '1.15') >= 0:
                    del self.oses[2]  # no more OS X 10.6

        elif self.num >= 778:  # Mac distribution naming was changed.
            # Platforms:  Name                            File ext     sys_id()
            self.oses = [
                ('Windows (x86)', '.exe', 'win32-32bit'),
                ('Mac OS X 10.6+ (x86_64/i386)', '.dmg', 'darwin-64bit'),
                ('Mac OS X 10.4+ (ppc/i386)', '32bit.dmg', 'darwin-32bit'),
                ('Ubuntu (x86_64)', 'amd64.deb', 'linux2-64bit'),
                ('Ubuntu (x86)', 'i386.deb', 'linux2-32bit')
            ]

        else:
            # Platforms:  Name                            File ext     sys_id()
            self.oses = [('Windows (x86)', '.exe', 'win32-32bit'),
                         ('Mac OS X 10.4+ (ppc/i386)', '.dmg', 'darwin-32bit'),
                         ('Mac OS X 10.6+ (x86_64/i386)', '64bit.dmg',
                          'darwin-64bit'),
                         ('Ubuntu (x86)', 'i386.deb', 'linux2-32bit'),
                         ('Ubuntu (x86_64)', 'amd64.deb', 'linux2-64bit')]

        self.platId = {
            'win32-32bit': 'win-x86',
            'darwin-32bit': 'mac10_4-x86-ppc',
            'darwin-64bit': 'mac10_6-x86-x86_64',
            'macx8-64bit': 'mac10_8-x86_64',
            'linux2-32bit': 'linux-x86',
            'linux2-64bit': 'linux-x86_64',
            'source': 'source'
        }

        # Prepare compiler logs present in the build dir.
        self.compress_logs()
Example #8
0
def todays_build_tag():
    now = time.localtime()
    return 'build' + build_number.todays_build()
    global DOOMSDAY_VERSION_REVISION
    global DOOMSDAY_RELEASE_TYPE
    
    DOOMSDAY_RELEASE_TYPE = releaseType
    DOOMSDAY_VERSION_FULL_PLAIN = versionBase
    DOOMSDAY_VERSION_FULL = versionBase
    if versionName:
        DOOMSDAY_VERSION_FULL += "-" + versionName    
    DOOMSDAY_VERSION_MAJOR = versionMajor
    DOOMSDAY_VERSION_MINOR = versionMinor
    DOOMSDAY_VERSION_REVISION = versionRevision

    if not quiet: print DOOMSDAY_VERSION_FULL + " (%s)" % releaseType

        
# Invoked from qmake? Returns "version_base buildnum releasetype win32_version_with_buildnum"
if __name__ == '__main__':
    import sys
    import build_number
    headerName = sys.argv[1]
    buildNum = build_number.todays_build()

    # Get the Doomsday version. We can use some of this information.
    find_version(True)
    
    major, minor, revision, name, reltype = parse_header_for_version(headerName)
    if not reltype: reltype = DOOMSDAY_RELEASE_TYPE
    
    print "%s.%s.%s %s %s %s,%s,%s,%s" % (major, minor, revision, buildNum, reltype,
                                          major, minor, revision, buildNum)