def update_changes(debChanges=False):
    """Generates the list of commits for the latest build."""

    git_pull()
    toTag = todays_build_tag()

    import build_version
    build_version.find_version(quiet=True)

    # Let's find the previous event of this version.
    fromTag = find_previous_tag(toTag,
                                build_version.DOOMSDAY_VERSION_FULL_PLAIN)

    if fromTag is None or toTag is None:
        # Range not defined.
        return

    print 'Changes for range', fromTag, '..', toTag

    changes = builder.Changes(fromTag, toTag)

    if debChanges:
        # Only update the Debian changelog.
        changes.generate('deb')

        # Also update the doomsday-fmod changelog (just version number).
        os.chdir(os.path.join(builder.config.DISTRIB_DIR, 'dsfmod'))

        fmodVer = build_version.parse_cmake_for_version(
            '../../doomsday/cmake/Version.cmake')
        debVer = "%s.%s.%s-%s" % (fmodVer[0], fmodVer[1], fmodVer[2],
                                  todays_build_tag())
        print "Marking new FMOD version:", debVer
        msg = 'New release: Doomsday Engine build %i.' % builder.Event(
        ).number()
        os.system(
            'rm -f debian/changelog && dch --check-dirname-level 0 --create --package doomsday-fmod -v %s "%s"'
            % (debVer, msg))
        os.system('dch --release ""')

    else:
        # Save version information.
        print >> file(builder.Event(toTag).file_path('version.txt'), 'wt'), \
            build_version.DOOMSDAY_VERSION_FULL
        print >> file(builder.Event(toTag).file_path('releaseType.txt'), 'wt'), \
            build_version.DOOMSDAY_RELEASE_TYPE

        changes.generate('html')
        changes.generate('xml')
def find_version():
    build_version.find_version()

    global DOOMSDAY_VERSION_FULL
    global DOOMSDAY_VERSION_FULL_PLAIN
    global DOOMSDAY_VERSION_MAJOR
    global DOOMSDAY_VERSION_MINOR
    global DOOMSDAY_VERSION_REVISION
    global DOOMSDAY_RELEASE_TYPE

    DOOMSDAY_RELEASE_TYPE = build_version.DOOMSDAY_RELEASE_TYPE
    DOOMSDAY_VERSION_FULL_PLAIN = build_version.DOOMSDAY_VERSION_FULL_PLAIN
    DOOMSDAY_VERSION_FULL = build_version.DOOMSDAY_VERSION_FULL
    DOOMSDAY_VERSION_MAJOR = build_version.DOOMSDAY_VERSION_MAJOR
    DOOMSDAY_VERSION_MINOR = build_version.DOOMSDAY_VERSION_MINOR
    DOOMSDAY_VERSION_REVISION = build_version.DOOMSDAY_VERSION_REVISION
    
    print 'Build:', DOOMSDAY_BUILD, 'on', TIMESTAMP
    print 'Version:', DOOMSDAY_VERSION_FULL_PLAIN, DOOMSDAY_RELEASE_TYPE
def find_version():
    build_version.find_version()

    global DOOMSDAY_VERSION_FULL
    global DOOMSDAY_VERSION_FULL_PLAIN
    global DOOMSDAY_VERSION_MAJOR
    global DOOMSDAY_VERSION_MINOR
    global DOOMSDAY_VERSION_REVISION
    global DOOMSDAY_RELEASE_TYPE

    DOOMSDAY_RELEASE_TYPE = build_version.DOOMSDAY_RELEASE_TYPE
    DOOMSDAY_VERSION_FULL_PLAIN = build_version.DOOMSDAY_VERSION_FULL_PLAIN
    DOOMSDAY_VERSION_FULL = build_version.DOOMSDAY_VERSION_FULL
    DOOMSDAY_VERSION_MAJOR = build_version.DOOMSDAY_VERSION_MAJOR
    DOOMSDAY_VERSION_MINOR = build_version.DOOMSDAY_VERSION_MINOR
    DOOMSDAY_VERSION_REVISION = build_version.DOOMSDAY_VERSION_REVISION

    print 'Build:', DOOMSDAY_BUILD, 'on', TIMESTAMP
    print 'Version:', DOOMSDAY_VERSION_FULL_PLAIN, DOOMSDAY_RELEASE_TYPE
Beispiel #4
0
def update_changes(debChanges=False):
    """Generates the list of commits for the latest build."""

    git_pull()
    toTag = todays_build_tag()

    import build_version
    build_version.find_version(quiet=True)

    # Let's find the previous event of this version.
    fromTag = find_previous_tag(toTag, build_version.DOOMSDAY_VERSION_FULL_PLAIN)
    
    if fromTag is None or toTag is None:
        # Range not defined.
        return

    print 'Changes for range', fromTag, '..', toTag

    changes = builder.Changes(fromTag, toTag)

    if debChanges:
        # Only update the Debian changelog.
        changes.generate('deb')

        # Also update the doomsday-fmod changelog (just version number).
        os.chdir(os.path.join(builder.config.DISTRIB_DIR, 'dsfmod'))
        
        fmodVer = build_version.parse_header_for_version('../../doomsday/plugins/fmod/include/version.h')
        debVer = "%s.%s.%s-%s" % (fmodVer[0], fmodVer[1], fmodVer[2], todays_build_tag())
        print "Marking new FMOD version:", debVer
        msg = 'New release: Doomsday Engine build %i.' % builder.Event().number()
        os.system('rm -f debian/changelog && dch --check-dirname-level 0 --create --package doomsday-fmod -v %s "%s"' % (debVer, msg))
        os.system('dch --release ""')

    else:
        # Save version information.
        print >> file(builder.Event(toTag).file_path('version.txt'), 'wt'), \
            build_version.DOOMSDAY_VERSION_FULL        
        print >> file(builder.Event(toTag).file_path('releaseType.txt'), 'wt'), \
            build_version.DOOMSDAY_RELEASE_TYPE
        
        changes.generate('html')
        changes.generate('xml')
Beispiel #5
0
def create_build_event():
    """Creates and tags a new build for with today's number."""
    print 'Creating a new build event.'
    git_pull()

    # Identifier/tag for today's build.
    todaysBuild = todays_build_tag()
    
    # Tag the source with the build identifier.
    git_tag(todaysBuild)
        
    # Prepare the build directory.
    ev = builder.Event(todaysBuild)
    ev.clean()
    
    # Save the version number and release type.
    import build_version
    build_version.find_version(quiet=True)
    print >> file(ev.file_path('version.txt'), 'wt'), \
        build_version.DOOMSDAY_VERSION_FULL
    print >> file(ev.file_path('releaseType.txt'), 'wt'), \
        build_version.DOOMSDAY_RELEASE_TYPE        

    update_changes()
Beispiel #6
0
def create_build_event():
    """Creates and tags a new build for with today's number."""
    print 'Creating a new build event.'
    git_pull()

    # Identifier/tag for today's build.
    todaysBuild = todays_build_tag()

    # Tag the source with the build identifier.
    git_tag(todaysBuild)

    # Prepare the build directory.
    ev = builder.Event(todaysBuild)
    ev.clean()

    # Save the version number and release type.
    import build_version
    build_version.find_version(quiet=True)
    print >> file(ev.file_path('version.txt'), 'wt'), \
        build_version.DOOMSDAY_VERSION_FULL
    print >> file(ev.file_path('releaseType.txt'), 'wt'), \
        build_version.DOOMSDAY_RELEASE_TYPE

    update_changes()
    def generate(self, format):
        fromTag = self.fromTag
        toTag = self.toTag

        if format == 'html':
            out = file(Event(toTag).file_path('changes.html'), 'wt')

            MAX_COMMITS = 100
            entries = self.entries[:MAX_COMMITS]

            if len(self.entries) > MAX_COMMITS:
                print >> out, '<p>Showing %i of %i commits.' % (
                    MAX_COMMITS, len(self.entries))
                print >> out, 'The <a href="%s">oldest commit</a> is dated %s.</p>' % \
                    (self.entries[-1].link, self.entries[-1].date)

            # Form groups.
            groups = self.form_groups(entries)
            keys = groups.keys()
            # Sort case-insensitively by group name.
            keys.sort(cmp=lambda a, b: cmp(str(a).lower(), str(b).lower()))
            for group in keys:
                if not len(groups[group]): continue

                print >> out, '<h3>%s</h3>' % group
                print >> out, '<ul>'

                # Write a list entry for each commit.
                for entry in groups[group]:
                    otherGroups = []
                    for tag in entry.tags + entry.guessedTags:
                        if tag != group:
                            otherGroups.append(tag)

                    others = self.pretty_group_list(otherGroups)
                    if others: others = ' (&rarr; %s)' % others

                    print >> out, '<li>'
                    print >> out, '<a href="%s">%s</a>: ' % (entry.link,
                                                             entry.date[:10])
                    print >> out, '<b>%s</b>' % entry.subject
                    print >> out, 'by <i>%s</i>%s' % (encodedText(
                        entry.author), others)
                    print >> out, '<blockquote style="color:#666;">%s</blockquote>' % entry.message(
                        encodeHtml=True)

                print >> out, '</ul>'
            out.close()

        elif format == 'xml':
            out = file(Event(toTag).file_path('changes.xml'), 'wt')
            print >> out, '<commitCount>%i</commitCount>' % len(self.entries)
            print >> out, '<commits>'
            for entry in self.entries:
                print >> out, '<commit>'
                print >> out, '<submitDate>%s</submitDate>' % entry.date
                out.write((u'<author>%s</author>\n' %
                           xmlEncodedText(entry.author)).encode('utf-8'))
                print >> out, '<repositoryUrl>%s</repositoryUrl>' % entry.link
                print >> out, '<sha1>%s</sha1>' % entry.hash
                if entry.tags or entry.guessedTags:
                    print >> out, '<tags>'
                    for t in entry.tags:
                        print >> out, '<tag guessed="false">%s</tag>' % xmlEncodedText(
                            t)
                    for t in entry.guessedTags:
                        print >> out, '<tag guessed="true">%s</tag>' % xmlEncodedText(
                            t)
                    print >> out, '</tags>'
                print >> out, '<title>%s</title>' % entry.subject
                if len(entry.message()):
                    print >> out, '<message>%s</message>' % entry.message()
                print >> out, '</commit>'
            print >> out, '</commits>'
            out.close()

        elif format == 'deb':
            import build_version
            build_version.find_version()

            # Append the changes to the debian package changelog.
            os.chdir(os.path.join(config.DISTRIB_DIR))

            # First we need to update the version.
            debVersion = build_version.DOOMSDAY_VERSION_FULL + '-' + Event(
            ).tag()

            # Always make one entry.
            print 'Marking new version...'
            msg = 'New release: %s build %i.' % (
                build_version.DOOMSDAY_RELEASE_TYPE, Event().number())

            # Reset the changelog.
            os.system('rm -f debian/changelog && ' + \
                'dch --check-dirname-level=0 --create --package doomsday -v %s "%s"' % (debVersion, msg))

            for entry in self.debChangeEntries:
                # Quote it for the command line.
                qch = entry.replace('"', '\\"').replace('!', '\\!')
                print ' *', qch
                os.system("dch --check-dirname-level 0 -a \"%s\"" % qch)

            os.system('dch --release ""')
Beispiel #8
0
TAG_MODIFIER = ''
BRANCH = 'master'

val = get_arg('--distrib')
if val is not None: DISTRIB_DIR = val

val = get_arg('--events')
if val is not None: EVENT_DIR = val

val = get_arg('--apt')
if val is not None: APT_REPO_DIR = val

val = get_arg('--branch')
if val is not None: BRANCH = val

val = get_arg('--tagmod')
if val is not None: TAG_MODIFIER = val

# Determine APT repository path.
oldCwd = os.getcwd()
if DISTRIB_DIR: os.chdir(DISTRIB_DIR)
import build_version
build_version.find_version(quiet=True)
if build_version.DOOMSDAY_RELEASE_TYPE == 'Stable':
    APT_DIST = 'dists/stable'
    APT_CONF_FILE = '~/Dropbox/APT/ftparchive-release-stable.conf'
else:
    APT_DIST = 'dists/unstable'
    APT_CONF_FILE = '~/Dropbox/APT/ftparchive-release.conf'
os.chdir(oldCwd)
#!/usr/bin/env hbpython
# Script for generating documentation for the wiki

import sys, os, subprocess
import build_version

sys.path += ['/Users/jaakko/Scripts']
import dew

is_dry_run = '--dry-run' in sys.argv
comment = 'Generated from Amethyst source by wikidocs.py'
build_version.find_version(quiet=True)


def amethyst(input, ame_opts=[]):
    """Runs amethyst with the given input and returns the output."""
    p = subprocess.Popen(['amethyst', '-dDOKUWIKI'] + ame_opts,
                         stdin=subprocess.PIPE,
                         stdout=subprocess.PIPE,
                         stderr=subprocess.PIPE)
    (output, errs) = p.communicate(input)
    return output


#
# for col in collections:
#     print 'Processing', col, 'documentation...'
#     pagesForCollection[col] = {}
#
#     for mode in modes:
#         print '-', mode
Beispiel #10
0
def mac_meta_update():
    """Update the OS X installer metadata."""
    import build_version
    build_version.find_version(quiet=True)
    system_command("deng_generate_installer_xml.py " + build_version.DOOMSDAY_VERSION_FULL_PLAIN)
Beispiel #11
0
    def generate(self, format):
        fromTag = self.fromTag
        toTag = self.toTag
        
        if format == 'html':
            out = file(Event(toTag).file_path('changes.html'), 'wt')

            MAX_COMMITS = 100
            entries = self.entries[:MAX_COMMITS]
            
            if len(self.entries) > MAX_COMMITS:
                print >> out, '<p>Showing %i of %i commits.' % (MAX_COMMITS, len(self.entries))
                print >> out, 'The <a href="%s">oldest commit</a> is dated %s.</p>' % \
                    (self.entries[-1].link, self.entries[-1].date)                
            
            # Form groups.
            groups = self.form_groups(entries)
            keys = groups.keys()
            # Sort case-insensitively by group name.
            keys.sort(cmp=lambda a, b: cmp(str(a).lower(), str(b).lower()))
            for group in keys:
                if not len(groups[group]): continue
                
                print >> out, '<h3>%s</h3>' % group                                
                print >> out, '<ul>'

                # Write a list entry for each commit.
                for entry in groups[group]:
                    otherGroups = []
                    for tag in entry.tags + entry.guessedTags:
                        if tag != group:
                            otherGroups.append(tag)
                            
                    others = self.pretty_group_list(otherGroups)
                    if others: others = ' (&rarr; %s)' % others
                    
                    print >> out, '<li>'    
                    print >> out, '<a href="%s">%s</a>: ' % (entry.link, entry.date[:10])
                    print >> out, '<b>%s</b>' % entry.subject
                    print >> out, 'by <i>%s</i>%s' % (encodedText(entry.author), others)
                    print >> out, '<blockquote style="color:#666;">%s</blockquote>' % entry.message(encodeHtml=True)
                    
                print >> out, '</ul>'
            out.close()
            
        elif format == 'xml':
            out = file(Event(toTag).file_path('changes.xml'), 'wt')
            print >> out, '<commitCount>%i</commitCount>' % len(self.entries)
            print >> out, '<commits>'
            for entry in self.entries:
                print >> out, '<commit>'
                print >> out, '<submitDate>%s</submitDate>' % entry.date
                print >> out, '<author>%s</author>' % entry.author
                print >> out, '<repositoryUrl>%s</repositoryUrl>' % entry.link
                print >> out, '<sha1>%s</sha1>' % entry.hash
                if entry.tags or entry.guessedTags:
                    print >> out, '<tags>'
                    for t in entry.tags:
                        print >> out, '<tag guessed="false">%s</tag>' % xmlEncodedText(t)
                    for t in entry.guessedTags:
                        print >> out, '<tag guessed="true">%s</tag>' % xmlEncodedText(t)
                    print >> out, '</tags>'
                print >> out, '<title>%s</title>' % entry.subject
                if len(entry.message()):
                    print >> out, '<message>%s</message>' % entry.message()
                print >> out, '</commit>'                
            print >> out, '</commits>'
            out.close()
            
        elif format == 'deb':
            import build_version
            build_version.find_version()

            # Append the changes to the debian package changelog.
            os.chdir(os.path.join(config.DISTRIB_DIR))
            
            # First we need to update the version.
            debVersion = build_version.DOOMSDAY_VERSION_FULL + '-' + Event().tag()

            # Always make one entry.
            print 'Marking new version...'
            msg = 'New release: %s build %i.' % (build_version.DOOMSDAY_RELEASE_TYPE,
                                                 Event().number())
            
            # Reset the changelog.
            os.system('rm -f debian/changelog && ' + \
                'dch --check-dirname-level=0 --create --package doomsday -v %s "%s"' % (debVersion, msg))

            for entry in self.debChangeEntries:
                # Quote it for the command line.
                qch = entry.replace('"', '\\"').replace('!', '\\!')
                print ' *', qch
                os.system("dch --check-dirname-level 0 -a \"%s\"" % qch)