Skip to content

Commit

Permalink
fix: fix empty model error in luis build while deploying (#2402)
Browse files Browse the repository at this point in the history
* fix empty model error in luis build

* remove space

Co-authored-by: Qi Kang <qika@microsoft.com>
Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
  • Loading branch information
3 people authored Mar 30, 2020
1 parent 736498d commit 6407d7a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions BotProject/Templates/CSharp/Scripts/deploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Param(
[string] $environment,
[string] $luisAuthoringKey,
[string] $luisAuthoringRegion,
[string] $language,
[string] $language,
[string] $projFolder = $(Get-Location),
[string] $botPath,
[string] $logFile = $(Join-Path $PSScriptRoot .. "deploy_log.txt")
Expand Down Expand Up @@ -115,6 +115,9 @@ if ($luisAuthoringKey -and $luisAuthoringRegion) {
"models" = $noneEmptyModels
}

$luString = $noneEmptyModels | Out-String
Write-Host $luString

$luconfigjson | ConvertTo-Json -Depth 100 | Out-File $(Join-Path $remoteBotPath luconfig.json)

# Execute bf luis:build command
Expand All @@ -127,7 +130,7 @@ if ($luisAuthoringKey -and $luisAuthoringRegion) {
New-Item -ItemType Directory -Force -Path generated
}

bf luis:build --in .\ --botName $name --authoringKey $luisAuthoringKey --dialog --out .\generated --suffix $customizedEnv -f --region $luisAuthoringRegion
bf luis:build --luConfig $(Join-Path $remoteBotPath luconfig.json) --botName $name --authoringKey $luisAuthoringKey --dialog --out .\generated --suffix $customizedEnv -f --region $luisAuthoringRegion
}
else {
Write-Host "bf luis:build does not exist, use the following command to install:"
Expand Down

0 comments on commit 6407d7a

Please sign in to comment.