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

Commit af50c23

Browse files
DiegoCardozo94darrenj
authored andcommitted
[TypeScript][Samples/Template] Add UTF8 default encoding for deployment scripts (#2130)
* Add UTF-8 * change from uppercase to lowercase * changes a lowcase and add 'enconding utf8' to sample assistant * Move the location of the encoding argument
1 parent ac565cf commit af50c23

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

templates/Virtual-Assistant-Template/typescript/generator-botbuilder-assistant/generators/app/templates/sample-assistant/deployment/scripts/deploy.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ if ($outputs)
184184
# Update appsettings.json
185185
Write-Host "> Updating appsettings.json ..."
186186
if (Test-Path $(Join-Path $projDir appsettings.json)) {
187-
$settings = Get-Content $(Join-Path $projDir appsettings.json) | ConvertFrom-Json
187+
$settings = Get-Content $(Join-Path $projDir appsettings.json) -Encoding utf8 | ConvertFrom-Json
188188
}
189189
else {
190190
$settings = New-Object PSObject

templates/Virtual-Assistant-Template/typescript/generator-botbuilder-assistant/generators/app/templates/sample-assistant/deployment/scripts/deploy_cognitive_models.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,4 +301,4 @@ foreach ($language in $languageArr)
301301
}
302302

303303
# Write out config to file
304-
$settings | ConvertTo-Json -depth 100 | Out-File $(Join-Path $outFolder "cognitivemodels.json" )
304+
$settings | ConvertTo-Json -depth 100 | Out-File $(Join-Path $outFolder "cognitivemodels.json") -Encoding utf8

templates/Virtual-Assistant-Template/typescript/generator-botbuilder-assistant/generators/app/templates/sample-assistant/deployment/scripts/publish.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ else {
2727
if (-not (Test-Path (Join-Path $projFolder '.deployment'))) {
2828

2929
# Add needed deployment configuration
30-
Add-Content -Path $(Join-Path $projFolder ".deployment") -Value @("[config]", "SCM_DO_BUILD_DURING_DEPLOYMENT=true")
30+
Add-Content -Path $(Join-Path $projFolder ".deployment") -Value @("[config]", "SCM_DO_BUILD_DURING_DEPLOYMENT=true") -Encoding utf8
3131
}
3232

3333
# Delete src zip, if it exists

templates/Virtual-Assistant-Template/typescript/generator-botbuilder-assistant/generators/skill/templates/sample-skill/deployment/scripts/deploy.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ if ($outputs)
187187
# Update appsettings.json
188188
Write-Host "> Updating appsettings.json ..."
189189
if (Test-Path $(Join-Path $projDir appsettings.json)) {
190-
$settings = Get-Content $(Join-Path $projDir appsettings.json) | ConvertFrom-Json
190+
$settings = Get-Content $(Join-Path $projDir appsettings.json) -Encoding utf8 | ConvertFrom-Json
191191
}
192192
else {
193193
$settings = New-Object PSObject

templates/Virtual-Assistant-Template/typescript/generator-botbuilder-assistant/generators/skill/templates/sample-skill/deployment/scripts/deploy_cognitive_models.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,4 +296,4 @@ foreach ($language in $languageArr)
296296
}
297297

298298
# Write out config to file
299-
$settings | ConvertTo-Json -depth 100 | Out-File $(Join-Path $outFolder "cognitivemodels.json" )
299+
$settings | ConvertTo-Json -depth 100 | Out-File $(Join-Path $outFolder "cognitivemodels.json") -Encoding utf8

templates/Virtual-Assistant-Template/typescript/samples/sample-assistant/deployment/scripts/deploy.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ if ($outputs)
184184
# Update appsettings.json
185185
Write-Host "> Updating appsettings.json ..."
186186
if (Test-Path $(Join-Path $projDir appsettings.json)) {
187-
$settings = Get-Content $(Join-Path $projDir appsettings.json) | ConvertFrom-Json
187+
$settings = Get-Content $(Join-Path $projDir appsettings.json) -Encoding utf8 | ConvertFrom-Json
188188
}
189189
else {
190190
$settings = New-Object PSObject

templates/Virtual-Assistant-Template/typescript/samples/sample-assistant/deployment/scripts/deploy_cognitive_models.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,4 +301,4 @@ foreach ($language in $languageArr)
301301
}
302302

303303
# Write out config to file
304-
$settings | ConvertTo-Json -depth 100 | Out-File $(Join-Path $outFolder "cognitivemodels.json" )
304+
$settings | ConvertTo-Json -depth 100 | Out-File $(Join-Path $outFolder "cognitivemodels.json") -Encoding utf8

templates/Virtual-Assistant-Template/typescript/samples/sample-assistant/deployment/scripts/publish.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ else {
2727
if (-not (Test-Path (Join-Path $projFolder '.deployment'))) {
2828

2929
# Add needed deployment configuration
30-
Add-Content -Path $(Join-Path $projFolder ".deployment") -Value @("[config]", "SCM_DO_BUILD_DURING_DEPLOYMENT=true")
30+
Add-Content -Path $(Join-Path $projFolder ".deployment") -Value @("[config]", "SCM_DO_BUILD_DURING_DEPLOYMENT=true") -Encoding utf8
3131
}
3232

3333
# Delete src zip, if it exists

templates/Virtual-Assistant-Template/typescript/samples/sample-skill/deployment/scripts/deploy.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ if ($outputs)
187187
# Update appsettings.json
188188
Write-Host "> Updating appsettings.json ..."
189189
if (Test-Path $(Join-Path $projDir appsettings.json)) {
190-
$settings = Get-Content $(Join-Path $projDir appsettings.json) | ConvertFrom-Json
190+
$settings = Get-Content $(Join-Path $projDir appsettings.json) -Encoding utf8 | ConvertFrom-Json
191191
}
192192
else {
193193
$settings = New-Object PSObject

templates/Virtual-Assistant-Template/typescript/samples/sample-skill/deployment/scripts/deploy_cognitive_models.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,4 +296,4 @@ foreach ($language in $languageArr)
296296
}
297297

298298
# Write out config to file
299-
$settings | ConvertTo-Json -depth 100 | Out-File $(Join-Path $outFolder "cognitivemodels.json" )
299+
$settings | ConvertTo-Json -depth 100 | Out-File $(Join-Path $outFolder "cognitivemodels.json") -Encoding utf8

0 commit comments

Comments
 (0)