Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Commit 15af6f9

Browse files
committed
updates to VA and Skill templates
1 parent 6b61a94 commit 15af6f9

File tree

13 files changed

+29
-28
lines changed

13 files changed

+29
-28
lines changed

templates/csharp/Skill/Skill/Deployment/Resources/template.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@
166166
"options": {
167167
"throughput": "[parameters('cosmosDbDatabaseThroughput')]"
168168
}
169-
}
169+
},
170+
"condition": "[parameters('useCosmosDb')]"
170171
},
171172
{
172173
"comments": "storage account",

templates/csharp/Skill/Skill/Deployment/Scripts/deploy.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ if (-not $armLuisAuthoringRegion) {
210210
}
211211

212212
# Get timestamp
213-
$timestamp = Get-Date -f MMddyyyyHHmmss
213+
$timestamp = Get-Date -Format MMddyyyyHHmmss
214214

215215
# Create resource group
216216
Write-Host "> Creating resource group ..." -NoNewline

templates/csharp/Skill/Skill/Deployment/Scripts/luis_functions.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function UpdateLUIS ($luFile, $appId, $endpoint, $subscriptionKey, $culture, $ve
5757
{
5858
$id = $luFile.BaseName
5959
$outFile = Join-Path $luFile.DirectoryName "$($id).json"
60-
60+
$appName = "$($name)$($culture)_$($id)"
6161

6262
Write-Host "> Getting hosted $($culture) $($id) LUIS model settings..." -NoNewline
6363
$luisApp = bf luis:application:show `
@@ -161,4 +161,4 @@ function RunLuisGen($luFile, $outName, $outFolder, $log)
161161
--className "$($outName)Luis" `
162162
--out $outFolder `
163163
--force 2>> $log | Out-Null
164-
}
164+
}

templates/csharp/Skill/Skill/Deployment/Scripts/publish.ps1

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,13 @@ if (-not $resourceGroup) {
5050
$resourceGroup = Read-Host "? Bot Resource Group"
5151
}
5252

53+
# Get path to csproj file
54+
$projFile = Get-ChildItem $projFolder `
55+
| Where-Object {$_.extension -eq ".csproj" } `
56+
| Select-Object -First 1
57+
5358
# Check for existing deployment files
5459
if (-not (Test-Path (Join-Path $projFolder '.deployment'))) {
55-
56-
# Get path to csproj file
57-
$projFile = Get-ChildItem $projFolder `
58-
| Where-Object {$_.extension -eq ".csproj" } `
59-
| Select-Object -First 1
60-
6160
# Add needed deployment files for az
6261
az bot prepare-deploy --lang Csharp --code-dir $projFolder --proj-file-path $projFile.name --output json | Out-Null
6362
}
@@ -70,7 +69,7 @@ if (Test-Path $zipPath) {
7069

7170
# Perform dotnet publish step ahead of zipping up
7271
$publishFolder = $(Join-Path $projFolder 'bin\release\netcoreapp3.0')
73-
dotnet publish -c release -o $publishFolder -v q > $logFile
72+
dotnet publish $projFile -c release -o $publishFolder -v q > $logFile
7473

7574
if($?) {
7675
# Compress source code

templates/csharp/Skill/Skill/Deployment/Scripts/qna_functions.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function DeployKB ($name, $luFile, $qnaSubscriptionKey, $qnaEndpoint, $language,
2323

2424
while ($retryAttemptsRemaining -ge 0) {
2525
$bfconfig = (bf qnamaker:kb:create `
26-
--name $name `
26+
--name "$($name)_$($id)" `
2727
--subscriptionKey $qnaSubscriptionKey `
2828
--endpoint $qnaEndpoint `
2929
--in $(Join-Path $outFolder $outFile) | ConvertFrom-Json) 2>> $log

templates/csharp/Skill/Skill/Skill.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<PackageReference Include="Microsoft.Bot.Builder.Azure" Version="4.9.1" />
1616
<PackageReference Include="Microsoft.Bot.Builder.Integration.ApplicationInsights.Core" Version="4.9.1" />
1717
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.9.1" />
18-
<PackageReference Include="Microsoft.Bot.Solutions" Version="1.0.0" />
18+
<PackageReference Include="Microsoft.Bot.Solutions" Version="1.0.1" />
1919
</ItemGroup>
2020

2121
<ItemGroup>

templates/csharp/VA/VA/Deployment/Resources/template.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@
216216
"options": {
217217
"throughput": "[parameters('cosmosDbDatabaseThroughput')]"
218218
}
219-
}
219+
},
220+
"condition": "[parameters('useCosmosDb')]"
220221
},
221222
{
222223
"comments": "storage account",

templates/csharp/VA/VA/Deployment/Scripts/deploy.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ if (-not $armLuisAuthoringRegion) {
210210
}
211211

212212
# Get timestamp
213-
$timestamp = Get-Date -f MMddyyyyHHmmss
213+
$timestamp = Get-Date -Format MMddyyyyHHmmss
214214

215215
# Create resource group
216216
Write-Host "> Creating resource group ..." -NoNewline

templates/csharp/VA/VA/Deployment/Scripts/luis_functions.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function UpdateLUIS ($luFile, $appId, $endpoint, $subscriptionKey, $culture, $ve
5757
{
5858
$id = $luFile.BaseName
5959
$outFile = Join-Path $luFile.DirectoryName "$($id).json"
60-
60+
$appName = "$($name)$($culture)_$($id)"
6161

6262
Write-Host "> Getting hosted $($culture) $($id) LUIS model settings..." -NoNewline
6363
$luisApp = bf luis:application:show `
@@ -161,4 +161,4 @@ function RunLuisGen($luFile, $outName, $outFolder, $log)
161161
--className "$($outName)Luis" `
162162
--out $outFolder `
163163
--force 2>> $log | Out-Null
164-
}
164+
}

templates/csharp/VA/VA/Deployment/Scripts/publish.ps1

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,13 @@ if (-not $resourceGroup) {
5050
$resourceGroup = Read-Host "? Bot Resource Group"
5151
}
5252

53+
# Get path to csproj file
54+
$projFile = Get-ChildItem $projFolder `
55+
| Where-Object {$_.extension -eq ".csproj" } `
56+
| Select-Object -First 1
57+
5358
# Check for existing deployment files
5459
if (-not (Test-Path (Join-Path $projFolder '.deployment'))) {
55-
56-
# Get path to csproj file
57-
$projFile = Get-ChildItem $projFolder `
58-
| Where-Object {$_.extension -eq ".csproj" } `
59-
| Select-Object -First 1
60-
6160
# Add needed deployment files for az
6261
az bot prepare-deploy --lang Csharp --code-dir $projFolder --proj-file-path $projFile.name --output json | Out-Null
6362
}
@@ -70,7 +69,7 @@ if (Test-Path $zipPath) {
7069

7170
# Perform dotnet publish step ahead of zipping up
7271
$publishFolder = $(Join-Path $projFolder 'bin\release\netcoreapp3.0')
73-
dotnet publish -c release -o $publishFolder -v q > $logFile
72+
dotnet publish $projFile -c release -o $publishFolder -v q > $logFile
7473

7574
if($?) {
7675
# Compress source code

0 commit comments

Comments
 (0)