Skip to content

Commit

Permalink
fix: language err for build luis in azure deploy (microsoft#4155)
Browse files Browse the repository at this point in the history
* language err for build luis

* refactor

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Co-authored-by: Andy Brown <asbrown002@gmail.com>
  • Loading branch information
3 people authored Sep 18, 2020
1 parent f4853c6 commit 9ba5e84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Composer/plugins/azurePublish/src/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export class BotProjectDeploy {
profileName: string,
name: string,
environment: string,
language?: string,
hostname?: string,
luisResource?: string
) {
Expand All @@ -55,6 +54,7 @@ export class BotProjectDeploy {

// STEP 2: UPDATE LUIS
// Do the LUIS build if LUIS settings are present
let language = settings.defaultLanguage || settings.luis.defaultLanguage;
if (!language) {
language = 'en-us';
}
Expand Down
16 changes: 3 additions & 13 deletions Composer/plugins/azurePublish/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ interface CreateAndDeployResources {
hostname?: string;
luisResource?: string;
subscriptionID: string;
language?: string;
}

interface PublishConfig {
Expand Down Expand Up @@ -192,15 +191,7 @@ export default async (composer: any): Promise<void> => {
resourcekey: string,
customizeConfiguration: CreateAndDeployResources
) => {
const {
subscriptionID,
accessToken,
name,
environment,
hostname,
luisResource,
language,
} = customizeConfiguration;
const { subscriptionID, accessToken, name, environment, hostname, luisResource } = customizeConfiguration;
try {
// Create the BotProjectDeploy object, which is used to carry out the deploy action.
const azDeployer = new BotProjectDeploy({
Expand All @@ -221,7 +212,7 @@ export default async (composer: any): Promise<void> => {
});

// Perform the deploy
await azDeployer.deploy(project, settings, profileName, name, environment, language, hostname, luisResource);
await azDeployer.deploy(project, settings, profileName, name, environment, hostname, luisResource);

// update status and history
const status = this.getLoadingStatus(botId, profileName, jobId);
Expand Down Expand Up @@ -322,7 +313,7 @@ export default async (composer: any): Promise<void> => {
environment,
hostname,
luisResource,
language,
defaultLanguage,
settings,
accessToken,
} = config;
Expand Down Expand Up @@ -360,7 +351,6 @@ export default async (composer: any): Promise<void> => {
environment,
hostname,
luisResource,
language,
};
await this.performDeploymentAction(
project,
Expand Down

0 comments on commit 9ba5e84

Please sign in to comment.