Skip to content

Commit

Permalink
fix(core.gbapp): Redeploy command now fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paulo Henrique (pragmatismo.io) committed Jul 18, 2019
1 parent 4f994b1 commit d68da40
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/admin.gbapp/dialogs/AdminDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import { Messages } from '../strings';
* Dialogs for administration tasks.
*/
export class AdminDialog extends IGBDialog {
public static async undeployPamand(text: any, min: GBMinInstance) {
public static async undeployPackageCommand(text: any, min: GBMinInstance) {
const packageName = text.split(' ')[1];
const importer = new GBImporter(min.core);
const deployer = new GBDeployer(min.core, importer);
Expand Down Expand Up @@ -138,8 +138,13 @@ export class AdminDialog extends IGBDialog {

return await step.replaceDialog('/admin', { firstRun: false });
} else if (cmdName === 'redeployPackage') {
await step.context.sendActivity('The package is being *unloaded*...');
await AdminDialog.undeployPackageCommand(text, min);
await step.context.sendActivity('Now, *deploying* package...');
await AdminDialog.deployPackageCommand(min, text, deployer);

await step.context.sendActivity('Package deployed. Just need to rebuild the index... Doing it right now.');
await AdminDialog.rebuildIndexPackageCommand(min, deployer);
await step.context.sendActivity('Finished importing of that .gbkb package. Thanks.');
return await step.replaceDialog('/admin', { firstRun: false });
} else if (cmdName === 'rebuildIndex') {
await AdminDialog.rebuildIndexPackageCommand(min, deployer);
Expand Down

0 comments on commit d68da40

Please sign in to comment.