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 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(
localFolder,
siteName,
folderName,
GBConfigService.get('CLOUD_USERNAME'),
GBConfigService.get('CLOUD_PASSWORD')
);
// .gbot packages are handled using storage API, so no download
// of local resources is required.
if (!localFolder.endsWith('.gbot')) {
GBLog.warn(`${GBConfigService.get('CLOUD_USERNAME')} must be authorized on SharePoint related site`);
await s.downloadFolder(
localFolder,
siteName,
folderName,
GBConfigService.get('CLOUD_USERNAME'),
GBConfigService.get('CLOUD_PASSWORD')
);
}
await deployer.deployPackage(min, localFolder);
}
}