Skip to content

Update code for Botservice #13953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BotService/Az.BotService.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 2020/12/18
# Generated on: 2021/1/14
#

@{
Expand Down
10 changes: 5 additions & 5 deletions src/BotService/Az.BotService.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
}
}
if(-not $accountsModule) {
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'1.8.1' } | Measure-Object).Count -gt 0
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.2.3' } | Measure-Object).Count -gt 0
if($hasAdequateVersion) {
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 1.8.1 -Scope Global -PassThru
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.2.3 -Scope Global -PassThru
}
}
}

if(-not $accountsModule) {
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
} elseif (($accountsModule.Version -lt [System.Version]'1.8.1') -and (-not $localAccounts)) {
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
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
} elseif (($accountsModule.Version -lt [System.Version]'2.2.3') -and (-not $localAccounts)) {
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
}
Write-Information "Loaded Module '$($accountsModule.Name)'"

Expand Down
2 changes: 1 addition & 1 deletion src/BotService/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Used the '3.0.414' version of autorest to generate code

## Version 0.1.0
* First preview release for module Az.BotService

2 changes: 1 addition & 1 deletion src/BotService/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@

[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]
[assembly: Guid("b3d96e8e-d888-44a7-95a9-ac2a9afb1de2")]
[assembly: Guid("6c8fcc3f-ad71-47de-810e-1add403cacb8")]
[assembly: AssemblyVersion("0.1.0")]
[assembly: AssemblyFileVersion("0.1.0")]
2 changes: 1 addition & 1 deletion src/BotService/build-module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder

if($NoDocs) {
Write-Host -ForegroundColor Green 'Creating exports...'
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder
} else {
Write-Host -ForegroundColor Green 'Creating exports and docs...'
$moduleDescription = 'Microsoft Azure PowerShell: BotService cmdlets'
Expand Down
4 changes: 2 additions & 2 deletions src/BotService/check-dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if(Test-Path -Path $localModulesPath) {
$env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
}

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

$tools = Join-Path $PSScriptRoot 'tools'
Expand All @@ -56,7 +56,7 @@ $resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestS
if ($Resources.IsPresent -and (-not (Test-Path -Path $resourceModule))) {
Write-Host -ForegroundColor Green "Building local Resource module used for test..."
Set-Location $resourceDir
$null = autorest-beta .\readme.md --output-folder=$HOME/.PSSharedModules/Resources
$null = autorest .\readme.md --use:@autorest/[email protected] --output-folder=$HOME/.PSSharedModules/Resources
$null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/
Set-Location $HOME/.PSSharedModules/Resources
$null = .\build-module.ps1
Expand Down
8 changes: 4 additions & 4 deletions src/BotService/custom/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ These provide functionality to our HTTP pipeline and other useful features. In s

### Attributes
For processing the cmdlets, we've created some additional attributes:
- `Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.DescriptionAttribute`
- `Microsoft.Azure.PowerShell.Cmdlets.BotService.DescriptionAttribute`
- 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.
- `Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.DoNotExportAttribute`
- `Microsoft.Azure.PowerShell.Cmdlets.BotService.DoNotExportAttribute`
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.BotService`.
- `Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.InternalExportAttribute`
- `Microsoft.Azure.PowerShell.Cmdlets.BotService.InternalExportAttribute`
- 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.
- `Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.ProfileAttribute`
- `Microsoft.Azure.PowerShell.Cmdlets.BotService.ProfileAttribute`
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
20 changes: 10 additions & 10 deletions src/BotService/generate-info.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"microsoft.azure_autorest.modeler": "2.3.55",
"node": "v10.16.0",
"autorest_modelerfour": "4.12.276",
"microsoft.azure_autorest-core": "2.0.4417",
"autorest_remodeler": "2.1.27",
"swagger_commit": "29af97eb5d0f7685ce2698a2b08f0868f013bd1e",
"microsoft.azure_classic-openapi-validator": "1.0.14",
"microsoft.azure_openapi-validator": "1.0.4",
"autorest_powershell": "2.2.0",
"autorest_core": "3.0.6257",
"microsoft.azure_autorest.csharp": "2.3.84",
"swagger_commit": "88b316702d8dd0b3cdf4a446376fbcd24f41cc3b",
"microsoft.azure_autorest-core": "2.0.4417",
"autorest_modelerfour": "4.12.276",
"autorest": "3.0.6187",
"autorest_csharp-v3": "3.0.0-dev.20200325.2",
"autorest": "3.0.6187"
"microsoft.azure_autorest.modeler": "2.3.55",
"microsoft.azure_autorest.csharp": "2.3.84",
"node": "v10.16.0",
"autorest_powershell": "3.0.410",
"autorest_remodeler": "2.1.27",
"autorest_core": "3.0.6257"
}
Loading