Skip to content

Commit 67ef552

Browse files
authored
Update docs about AzDev (#27328)
1 parent 1b9c737 commit 67ef552

File tree

2 files changed

+34
-5
lines changed

2 files changed

+34
-5
lines changed

tools/AzDev/AzDev/CommonRepo.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
Path to the common repo. Relative or absolute.
2525
2626
.Example
27-
Connect-CommonRepo -CommonRepoPath ../azure-powershell-common
27+
Connect-DevCommonRepo -CommonRepoPath ../azure-powershell-common
2828
#>
2929
function Connect-DevCommonRepo {
3030
[CmdletBinding()]
@@ -104,7 +104,7 @@ function Connect-DevCommonRepo {
104104
}
105105

106106
function Disconnect-DevCommonRepo {
107-
Write-Host "Please run the following commands to undo Connect-CommonRepo. Double check those files do not have wanted changes.
107+
Write-Host "Please run the following commands to undo Connect-DevCommonRepo. Double check those files do not have wanted changes.
108108
git checkout -- ./src/Accounts/Accounts.sln
109109
git checkout -- ./src/Accounts/AssemblyLoading/AssemblyLoading.csproj
110110
git checkout -- ./src/Accounts/Authentication/Authentication.csproj

tools/AzDev/README.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ This module is designed to help developers of Azure PowerShell modules. It provi
44

55
All the cmdlets in this module are prefixed with `Dev-` to avoid conflicts with other modules.
66

7+
- [Quick start](#quick-start)
8+
- [Features](#features)
9+
- [Repo inventory](#repo-inventory)
10+
- [Connect azure-powershell and azure-powershell-common](#connect-azure-powershell-and-azure-powershell-common)
11+
- [Autorest helper](#autorest-helper)
12+
- [Open swagger online](#open-swagger-online)
13+
- [Development](#development)
14+
- [Design](#design)
15+
- [Testing](#testing)
16+
717
## Quick start
818

919
```powershell
@@ -56,10 +66,10 @@ Help you connect the azure-powershell and azure-powershell-common repositories f
5666

5767
```powershell
5868
# Connect
59-
Connect-CommonRepo
69+
Connect-DevCommonRepo
6070
6171
# Disconnect
62-
Disconnect-CommonRepo
72+
Disconnect-DevCommonRepo
6373
```
6474

6575
### Autorest helper
@@ -81,4 +91,23 @@ Multiple swagger references found in [SapVirtualInstance.Autorest]
8191
Enter the number corresponding to your selection
8292
1
8393
Opening https://github.com/Azure/azure-rest-api-specs/blob/202321f386ea5b0c103b46902d43b3d3c50e029c/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/readme.md in default browser...
84-
```
94+
```
95+
96+
## Development
97+
98+
### Design
99+
100+
`AzDev` supports both C# based and script based cmdlets.
101+
102+
The script based cmdlets are located in the `AzDev` folder. Take a look at `AzDev/CommonRepo.psm1` for example. Update `NestedModules` in `AzDev.psd1` when you add new scripts.
103+
104+
The C# based cmdlets are located in the `src` folder. It's quite similar to developing a SDK-based module in Azure PowerShell.
105+
106+
Either way, make sure
107+
108+
1. All cmdlets are prefixed with `Dev-`.
109+
2. Add your new cmdlets to `FunctionsToExport` or `CmdletsToExport` in `AzDev.psd1`.
110+
111+
### Testing
112+
113+
Use `dotnet test` to run the unit tests. `Invoke-Pester` to run the E2E tests located in `Tests/PSTests`.

0 commit comments

Comments
 (0)