예제 #1
0
    def writeIEUpdateManifest(self, versions):
        """
          Writes update.json file for the latest IE build
        """
        if len(versions) == 0:
            return

        version = versions[0]
        packageName = self.basename + '-' + version + self.config.packageSuffix
        updateURL = urlparse.urljoin(self.config.nightliesURL, self.basename + '/' + packageName + '?update')
        baseDir = os.path.join(self.config.nightliesDirectory, self.basename)
        manifestPath = os.path.join(baseDir, 'update.json')

        from sitescripts.extensions.utils import writeIEUpdateManifest as doWrite
        doWrite(manifestPath, [{
            'basename': self.basename,
            'version': version,
            'updateURL': updateURL
        }])

        for suffix in ['-x86.msi', '-x64.msi', '-gpo-x86.msi', '-gpo-x64.msi']:
            linkPath = os.path.join(baseDir, '00latest%s' % suffix)
            outputPath = os.path.join(baseDir, self.basename + '-' + version + suffix)
            if hasattr(os, 'symlink'):
                if os.path.exists(linkPath):
                    os.remove(linkPath)
                os.symlink(os.path.basename(outputPath), linkPath)
            else:
                shutil.copyfile(outputPath, linkPath)
예제 #2
0
    def writeIEUpdateManifest(self, versions):
        """
          Writes update.json file for the latest IE build
        """
        if len(versions) == 0:
            return

        version = versions[0]
        packageName = self.basename + '-' + version + self.config.packageSuffix
        updateURL = urlparse.urljoin(self.config.nightliesURL, self.basename + '/' + packageName + '?update')
        baseDir = os.path.join(self.config.nightliesDirectory, self.basename)
        manifestPath = os.path.join(baseDir, 'update.json')

        from sitescripts.extensions.utils import writeIEUpdateManifest as doWrite
        doWrite(manifestPath, [{
            'basename': self.basename,
            'version': version,
            'updateURL': updateURL,
        }])

        for suffix in ['-x86.msi', '-x64.msi', '-gpo-x86.msi', '-gpo-x64.msi']:
            linkPath = os.path.join(baseDir, '00latest%s' % suffix)
            outputPath = os.path.join(baseDir, self.basename + '-' + version + suffix)
            if hasattr(os, 'symlink'):
                if os.path.exists(linkPath):
                    os.remove(linkPath)
                os.symlink(os.path.basename(outputPath), linkPath)
            else:
                shutil.copyfile(outputPath, linkPath)