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

Commit 14916ff

Browse files
author
Darren Jefford
committed
Get-Date fix and replicate publish change to skill
1 parent 928bc8e commit 14916ff

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

samples/csharp/assistants/virtual-assistant/VirtualAssistantSample/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

samples/csharp/skill/SkillSample/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

samples/csharp/skill/SkillSample/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)