Skip to content

Commit 8ffed22

Browse files
Update code for Botservice (#13953)
* update code for Botservice * Update the changelog file * Update Changelog.md Co-authored-by: Jin Lei <[email protected]>
1 parent fbb05f4 commit 8ffed22

39 files changed

+660
-561
lines changed

src/BotService/Az.BotService.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 2020/12/18
6+
# Generated on: 2021/1/14
77
#
88

99
@{

src/BotService/Az.BotService.psm1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@
2424
}
2525
}
2626
if(-not $accountsModule) {
27-
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'1.8.1' } | Measure-Object).Count -gt 0
27+
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.2.3' } | Measure-Object).Count -gt 0
2828
if($hasAdequateVersion) {
29-
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 1.8.1 -Scope Global -PassThru
29+
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.2.3 -Scope Global -PassThru
3030
}
3131
}
3232
}
3333

3434
if(-not $accountsModule) {
35-
Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
36-
} elseif (($accountsModule.Version -lt [System.Version]'1.8.1') -and (-not $localAccounts)) {
37-
Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
35+
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
36+
} elseif (($accountsModule.Version -lt [System.Version]'2.2.3') -and (-not $localAccounts)) {
37+
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
3838
}
3939
Write-Information "Loaded Module '$($accountsModule.Name)'"
4040

src/BotService/Changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Used the '3.0.414' version of autorest to generate code
2122

2223
## Version 0.1.0
2324
* First preview release for module Az.BotService
24-

src/BotService/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323

2424
[assembly: ComVisible(false)]
2525
[assembly: CLSCompliant(false)]
26-
[assembly: Guid("b3d96e8e-d888-44a7-95a9-ac2a9afb1de2")]
26+
[assembly: Guid("6c8fcc3f-ad71-47de-810e-1add403cacb8")]
2727
[assembly: AssemblyVersion("0.1.0")]
2828
[assembly: AssemblyFileVersion("0.1.0")]

src/BotService/build-module.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder
122122

123123
if($NoDocs) {
124124
Write-Host -ForegroundColor Green 'Creating exports...'
125-
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs
125+
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder
126126
} else {
127127
Write-Host -ForegroundColor Green 'Creating exports and docs...'
128128
$moduleDescription = 'Microsoft Azure PowerShell: BotService cmdlets'

src/BotService/check-dependencies.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if(Test-Path -Path $localModulesPath) {
4646
$env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
4747
}
4848

49-
DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '1.8.1'
49+
DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.2.3'
5050
DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1'
5151

5252
$tools = Join-Path $PSScriptRoot 'tools'
@@ -56,7 +56,7 @@ $resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestS
5656
if ($Resources.IsPresent -and (-not (Test-Path -Path $resourceModule))) {
5757
Write-Host -ForegroundColor Green "Building local Resource module used for test..."
5858
Set-Location $resourceDir
59-
$null = autorest-beta .\readme.md --output-folder=$HOME/.PSSharedModules/Resources
59+
$null = autorest .\readme.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources
6060
$null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/
6161
Set-Location $HOME/.PSSharedModules/Resources
6262
$null = .\build-module.ps1

src/BotService/custom/readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ These provide functionality to our HTTP pipeline and other useful features. In s
3131

3232
### Attributes
3333
For processing the cmdlets, we've created some additional attributes:
34-
- `Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.DescriptionAttribute`
34+
- `Microsoft.Azure.PowerShell.Cmdlets.BotService.DescriptionAttribute`
3535
- Used in C# cmdlets to provide a high-level description of the cmdlet. This is propegated to reference documentation via [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
36-
- `Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.DoNotExportAttribute`
36+
- `Microsoft.Azure.PowerShell.Cmdlets.BotService.DoNotExportAttribute`
3737
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.BotService`.
38-
- `Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.InternalExportAttribute`
38+
- `Microsoft.Azure.PowerShell.Cmdlets.BotService.InternalExportAttribute`
3939
- Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.BotService`. For more information, see [readme.md](..\internal/readme.md) in the `..\internal` folder.
40-
- `Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.ProfileAttribute`
40+
- `Microsoft.Azure.PowerShell.Cmdlets.BotService.ProfileAttribute`
4141
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.

src/BotService/generate-info.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"microsoft.azure_autorest.modeler": "2.3.55",
3-
"node": "v10.16.0",
4-
"autorest_modelerfour": "4.12.276",
5-
"microsoft.azure_autorest-core": "2.0.4417",
6-
"autorest_remodeler": "2.1.27",
7-
"swagger_commit": "29af97eb5d0f7685ce2698a2b08f0868f013bd1e",
82
"microsoft.azure_classic-openapi-validator": "1.0.14",
93
"microsoft.azure_openapi-validator": "1.0.4",
10-
"autorest_powershell": "2.2.0",
11-
"autorest_core": "3.0.6257",
12-
"microsoft.azure_autorest.csharp": "2.3.84",
4+
"swagger_commit": "88b316702d8dd0b3cdf4a446376fbcd24f41cc3b",
5+
"microsoft.azure_autorest-core": "2.0.4417",
6+
"autorest_modelerfour": "4.12.276",
7+
"autorest": "3.0.6187",
138
"autorest_csharp-v3": "3.0.0-dev.20200325.2",
14-
"autorest": "3.0.6187"
9+
"microsoft.azure_autorest.modeler": "2.3.55",
10+
"microsoft.azure_autorest.csharp": "2.3.84",
11+
"node": "v10.16.0",
12+
"autorest_powershell": "3.0.410",
13+
"autorest_remodeler": "2.1.27",
14+
"autorest_core": "3.0.6257"
1515
}

0 commit comments

Comments
 (0)