def __Step_MakePackage(self, overwrite_existing):
print 'Making %s package...' % (self.PACKAGE_NAME or '<NONE>')
if self.RELEASE_NAME_FREE_FORMAT:
release_name = self.__ParseMacros(self.RELEASE_NAME_FREE_FORMAT).format(*self.VERSION)
else:
release_name = (self.VERSION[3]
and self.__ParseMacros(self.RELEASE_NAME_WITH_BUILD_FMT % self.VERSION)
or self.__ParseMacros(self.RELEASE_NAME_FMT % self.VERSION[:3]))
package_file_name = self.__MakeSrcPath(os.path.join('/', self.ARCHIVE_DEST, release_name))
archive_name = package_file_name + '.zip'
if os.path.exists(archive_name):
if not overwrite_existing:
print 'ERROR: Package for this version already exists: %s' % archive_name
exit(-1)
print '=> package already exists. DELETING.'
os.remove(archive_name)
shutil.make_archive(package_file_name, 'zip', self.__GetAbsReleaseFolder(), 'GameData')
print '=> stored in:', package_file_name
# Fills VERSION given the string or int compinents. The patch and build could be "*".
评论列表
文章目录