Only upload plugin if file exists #4695

Some platforms (e.g. Mac 10.6) don't build the plugin
This commit is contained in:
Nick Bolton 2015-05-25 16:57:28 +01:00
parent a900543c1d
commit 8ed3d79cc2

View File

@ -1355,11 +1355,12 @@ class InternalCommands:
packageTarget = self.dist_name_rev(type) packageTarget = self.dist_name_rev(type)
ftp.upload(packageSource, packageTarget) ftp.upload(packageSource, packageTarget)
if (type != 'src'): if type != 'src':
pluginsDir = binDir + '/plugins' pluginsDir = binDir + '/plugins'
nsPluginSource = self.findLibraryFile(type, pluginsDir, 'ns') nsPluginSource = self.findLibraryFile(type, pluginsDir, 'ns')
nsPluginTarget = self.getLibraryDistFilename(type, pluginsDir, 'ns') if nsPluginSource:
ftp.upload(nsPluginSource, nsPluginTarget, "plugins") nsPluginTarget = self.getLibraryDistFilename(type, pluginsDir, 'ns')
ftp.upload(nsPluginSource, nsPluginTarget, "plugins")
def getLibraryDistFilename(self, type, dir, name): def getLibraryDistFilename(self, type, dir, name):
(platform, packageExt, libraryExt) = self.getDistributePlatformInfo(type) (platform, packageExt, libraryExt) = self.getDistributePlatformInfo(type)
@ -1384,7 +1385,7 @@ class InternalCommands:
if re.search(pattern, filename): if re.search(pattern, filename):
return dir + '/' + filename return dir + '/' + filename
raise Exception('Could not find library name with pattern: ' + pattern) return None
def getDistributePlatformInfo(self, type): def getDistributePlatformInfo(self, type):
ext = None ext = None