fix(admin.gbapp): Removal of download during deployment of .gbot packages.

This commit is contained in:
Rodrigo Rodriguez 2021-01-07 19:42:03 -03:00
parent b71121932d
commit f4d5cf92d2

View file

@ -172,14 +172,20 @@ export class GBAdminService implements IGBAdminService {
const s = new GBSharePointService(); const s = new GBSharePointService();
const localFolder = Path.join('work', `${min.instance.botId}.gbai`, Path.basename(folderName)); const localFolder = Path.join('work', `${min.instance.botId}.gbai`, Path.basename(folderName));
GBLog.warn(`${GBConfigService.get('CLOUD_USERNAME')} must be authorized on SharePoint related site`);
await s.downloadFolder( // .gbot packages are handled using storage API, so no download
localFolder, // of local resources is required.
siteName,
folderName, if (!localFolder.endsWith('.gbot')) {
GBConfigService.get('CLOUD_USERNAME'), GBLog.warn(`${GBConfigService.get('CLOUD_USERNAME')} must be authorized on SharePoint related site`);
GBConfigService.get('CLOUD_PASSWORD') await s.downloadFolder(
); localFolder,
siteName,
folderName,
GBConfigService.get('CLOUD_USERNAME'),
GBConfigService.get('CLOUD_PASSWORD')
);
}
await deployer.deployPackage(min, localFolder); await deployer.deployPackage(min, localFolder);
} }
} }