Skip to content
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

change the branch name from master to main #15238

Merged
merged 1 commit into from
Jun 11, 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 .azure-pipelines/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ schedules:
displayName: Daily Midnight Build
branches:
include:
- master
- main

pr: none

Expand Down
4 changes: 2 additions & 2 deletions documentation/Debugging-StaticAnalysis-Errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ _Note_: Sometimes the error listed in the .csv file can be a false positive (for
We take breaking changes very seriously, so please be mindful about the violations that you suppress in our repo.

### Signature Issues
Signature issues occur when your cmdlets do not follow PowerShell standards. Please check the [_Cmdlet Best Practices_](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/design-guidelines/cmdlet-best-practices.md) and the [_Parameter Best Practices_](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/design-guidelines/parameter-best-practices.md) documents to ensure you are following PowerShell guidelines. Issues with severity 0 or 1 must be addressed, while issues with severity 2 are advisory. If you have an issue with severity 0 or 1 that has been approved by the Azure PowerShell team, you can suppress them following these steps:
Signature issues occur when your cmdlets do not follow PowerShell standards. Please check the [_Cmdlet Best Practices_](https://github.com/Azure/azure-powershell/blob/main/documentation/development-docs/design-guidelines/cmdlet-best-practices.md) and the [_Parameter Best Practices_](https://github.com/Azure/azure-powershell/blob/main/documentation/development-docs/design-guidelines/parameter-best-practices.md) documents to ensure you are following PowerShell guidelines. Issues with severity 0 or 1 must be addressed, while issues with severity 2 are advisory. If you have an issue with severity 0 or 1 that has been approved by the Azure PowerShell team, you can suppress them following these steps:

- Download the `SignatureIssues.csv` file from the Jenkins build
- Open the file using a text editor (such as VS Code) and copy each of the errors you'd like to suppress
Expand All @@ -51,4 +51,4 @@ Signature issues occur when your cmdlets do not follow PowerShell standards. Pl
- Push the changes to the .csv file and ensure the errors no longer show up in the `SignatureIssues.csv` file output from the Jenkins build.

### Help Issues
Most help issues that cause StaticAnalysis to fail occur when help has not been added for a particular cmdlet. If you have not generated help for your new cmdlets, please follow the instructions [here](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/help-generation.md). If this is not the issue, follow the steps listed under "Remediation" for each violation listed in HelpIssues.csv.
Most help issues that cause StaticAnalysis to fail occur when help has not been added for a particular cmdlet. If you have not generated help for your new cmdlets, please follow the instructions [here](https://github.com/Azure/azure-powershell/blob/main/documentation/development-docs/help-generation.md). If this is not the issue, follow the steps listed under "Remediation" for each violation listed in HelpIssues.csv.
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ You now be able to create your own branches, commit changes, and push commits to
git remote add upstream https://github.com/Azure/azure-powershell.git
```

Then, to pull changes from the **master** branch in _Azure/azure-powershell_ into your local working branch, run the following command:
Then, to pull changes from the **main** branch in _Azure/azure-powershell_ into your local working branch, run the following command:

```
git pull upstream master
git pull upstream main
```

## Building the Environment
Expand Down
6 changes: 3 additions & 3 deletions documentation/development-docs/cleaning-up-commits.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ For more information on squashing, click [here](https://git-scm.com/book/en/v2/G

If you want to merge specific commits from another branch into the current one you are working from, use **cherry-picking**.

For example, if you're working on the **master** branch and want to pull commit X (the commit-hash) from the **feature** branch, you may run the following commands:
For example, if you're working on the **main** branch and want to pull commit X (the commit-hash) from the **feature** branch, you may run the following commands:

```
git checkout master
git checkout main
git cherry-pick X -n
```

Expand All @@ -73,7 +73,7 @@ Now, if you want to cherry-pick a range of commits, say X through Y, from the **

```
git checkout -b temp-branch X
git rebase --onto master Y^
git rebase --onto main Y^
```

For more information on cherry-picking, click [here](https://git-scm.com/docs/git-cherry-pick).
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ $job | Wait-Job
$subscriptions = $job | Receive-Job
````

To set a custom job name, please use [`SetBackgroupJobDescription`](https://github.com/Azure/azure-powershell-common/blob/master/src/Common/AzurePSCmdlet.cs#L810). The default job description is: "Long Running Operation for '{cmdlet name}' on resource '{resource name}'"
To set a custom job name, please use [`SetBackgroupJobDescription`](https://github.com/Azure/azure-powershell-common/blob/main/src/Common/AzurePSCmdlet.cs#L810). The default job description is: "Long Running Operation for '{cmdlet name}' on resource '{resource name}'"

### Required Parameter Sets

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ if "List Private Endpoint Connection API" is not available, `Private Endpoint Co
`privateEndpointConnections` need to be defined under this API

## Code Changes Needed
Add corresponding {Provider}, {Top-Level-Resource} and {API-Version} into [ProviderConfiguration.cs](https://github.com/Azure/azure-powershell/blob/master/src/Network/Network/PrivateLinkService/PrivateLinkServiceProvider/ProviderConfiguration.cs#L12)
Add corresponding {Provider}, {Top-Level-Resource} and {API-Version} into [ProviderConfiguration.cs](https://github.com/Azure/azure-powershell/blob/main/src/Network/Network/PrivateLinkService/PrivateLinkServiceProvider/ProviderConfiguration.cs#L12)
in following pattern:
```
RegisterConfiguration("{Provider}/{Top-Level-Resource}", "{API-Version}")
```
For example:

if "List Private Endpoint Connection API" is [available](https://github.com/Azure/azure-powershell/blob/master/src/Network/Network/PrivateLinkService/PrivateLinkServiceProvider/GenericProvider.cs#L74),
if "List Private Endpoint Connection API" is [available](https://github.com/Azure/azure-powershell/blob/main/src/Network/Network/PrivateLinkService/PrivateLinkServiceProvider/GenericProvider.cs#L74),
```
RegisterConfiguration("Microsoft.Sql/servers", "2018-06-01-preview")
```
if "List Private Endpoint Connection API" is [not available](https://github.com/Azure/azure-powershell/blob/master/src/Network/Network/PrivateLinkService/PrivateLinkServiceProvider/GenericProvider.cs#L93), provide extra bool parameter 'false'
if "List Private Endpoint Connection API" is [not available](https://github.com/Azure/azure-powershell/blob/main/src/Network/Network/PrivateLinkService/PrivateLinkServiceProvider/GenericProvider.cs#L93), provide extra bool parameter 'false'
```
RegisterConfiguration("Microsoft.Storage/storageAccounts", "2019-06-01", false)
```
Expand Down
14 changes: 7 additions & 7 deletions documentation/development-docs/generate-format.ps1xml-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Our team trends to make the cmdlets output more convenient and consistent across

# How table view output works by default.

As an example let's consider [Get-AzSubscription](https://github.com/Azure/azure-powershell/blob/master/src/Accounts/Accounts/Subscription/GetAzureRMSubscription.cs) cmdlet.
As an example let's consider [Get-AzSubscription](https://github.com/Azure/azure-powershell/blob/main/src/Accounts/Accounts/Subscription/GetAzureRMSubscription.cs) cmdlet.

The cmdlet class specifies the ```PSAzureSubscription``` class as an output type with the **OutputType attribute**:

Expand All @@ -31,7 +31,7 @@ namespace Microsoft.Azure.Commands.Profile
// omitted for brevity the rest of the definition.
```

The [PSAzureSubscription](https://github.com/Azure/azure-powershell-common/blob/master/src/Authentication.ResourceManager/Models/PSAzureSubscription.cs) class contains several public properties.
The [PSAzureSubscription](https://github.com/Azure/azure-powershell-common/blob/main/src/Authentication.ResourceManager/Models/PSAzureSubscription.cs) class contains several public properties.

* Id
* Name
Expand Down Expand Up @@ -122,7 +122,7 @@ To provide a better PowerShell Azure cmdlets output experience we worked out a m

# Ps1XmlAttribute attribute.

The key element of the mechanism is the **Ps1XmlAttribute** attribute located in the [Commands.Common](https://github.com/Azure/azure-powershell-common/blob/master/src/Common/Attributes/Ps1XmlAttribute.cs) project. Below is the attribute definition:
The key element of the mechanism is the **Ps1XmlAttribute** attribute located in the [Commands.Common](https://github.com/Azure/azure-powershell-common/blob/main/src/Common/Attributes/Ps1XmlAttribute.cs) project. Below is the attribute definition:

```Cs
namespace Microsoft.WindowsAzure.Commands.Common.Attributes
Expand Down Expand Up @@ -223,7 +223,7 @@ namespace Microsoft.Azure.Commands.Profile.Models
```
* If **Label** is not specified - the property name will be used.

* Since the **Ps1Xml attribute** definition is located in the [Commands.Common](https://github.com/Azure/azure-powershell-common/tree/master/src/Common) project and the Command.Common project is likely referenced from your project - to make the attribute visible - you only need to add ```using Microsoft.WindowsAzure.Commands.Common.Attributes;``` statement.
* Since the **Ps1Xml attribute** definition is located in the [Commands.Common](https://github.com/Azure/azure-powershell-common/tree/main/src/Common) project and the Command.Common project is likely referenced from your project - to make the attribute visible - you only need to add ```using Microsoft.WindowsAzure.Commands.Common.Attributes;``` statement.

## Properties of complex types.

Expand Down Expand Up @@ -425,12 +425,12 @@ c9cbd920-c00c-427c-852b-c329e824c3a8 Azure SDK Powershell Test Enabled 72f988bf-

**Note:** All the paths used in the example in the section are under **_azure-powershell/src/Accounts_**

1. Copy the generated file into your project source folder. In our example this is [src/Accounts/Accounts](https://github.com/Azure/azure-powershell/tree/master/src/Accounts/Accounts) folder.
1. Copy the generated file into your project source folder. In our example this is [src/Accounts/Accounts](https://github.com/Azure/azure-powershell/tree/main/src/Accounts/Accounts) folder.

2. Reference the generated format.ps1xml file form your project. In our example this is [Accounts.csproj](https://github.com/Azure/azure-powershell/blob/master/src/Accounts/Accounts/Accounts.csproj) file.
2. Reference the generated format.ps1xml file form your project. In our example this is [Accounts.csproj](https://github.com/Azure/azure-powershell/blob/main/src/Accounts/Accounts/Accounts.csproj) file.
- **Note**: This is now automatically referenced based on `Az.props` being imported in your csproj file.

3. Add the generated format.ps1xml file to your source module manifest **FormatsToProcess** variable. In our example this is [src/Accounts/Az.Accounts.psd1](https://github.com/Azure/azure-powershell/blob/master/src/Accounts/Az.Accounts.psd1) file:
3. Add the generated format.ps1xml file to your source module manifest **FormatsToProcess** variable. In our example this is [src/Accounts/Az.Accounts.psd1](https://github.com/Azure/azure-powershell/blob/main/src/Accounts/Az.Accounts.psd1) file:
```Powershell
# script omitted for brevity

Expand Down
2 changes: 1 addition & 1 deletion documentation/development-docs/help-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ If you would like to update the inputs/outputs for a markdown file, please run t

This will update all of the markdown files with public interface changes made to corresponding cmdlets, add markdown files for any new cmdlets, remove markdown files for any deleted cmdlets, and update the module page (_e.g.,_ `Az.Accounts.md`) with any added or removed cmdlets.

_This seems to work better when run from within the `help` folder itself (For e.g. to generate the help files for the [`Network`](https://github.com/Azure/azure-powershell/tree/master/src/Network) module run the cmd from under [`Commands.Network/help`](https://github.com/Azure/azure-powershell/tree/master/src/Network/Network/help)). Also, you will have to import the profile module from under <Repo base path>/artifacts/Debug/Az.Accounts/Az.Accounts.psd1_
_This seems to work better when run from within the `help` folder itself (For e.g. to generate the help files for the [`Network`](https://github.com/Azure/azure-powershell/tree/main/src/Network) module run the cmd from under [`Commands.Network/help`](https://github.com/Azure/azure-powershell/tree/main/src/Network/Network/help)). Also, you will have to import the profile module from under <Repo base path>/artifacts/Debug/Az.Accounts/Az.Accounts.psd1_

#### Updating a single markdown file

Expand Down
6 changes: 3 additions & 3 deletions documentation/development-docs/sdkbased-vs-autogen.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Highlight parameters differences in auto-gen modules as below.
- Implement cmdlets in C# based on management SDK for Dotnet
- Implement testcases
- Generate docs, and populate them with examples
- Create a PR in master branch for code review
- Create a PR in main branch for code review

### Auto-gen Module

Expand All @@ -45,7 +45,7 @@ Highlight parameters differences in auto-gen modules as below.
- Implement testcases
- Generate docs and populate them with examples
- Create a PR in **generation** branch for code review
- Azure team members will help merge code from generation branch to master branch
- Azure team members will help merge code from generation branch to main branch

## Customization

Expand Down Expand Up @@ -78,7 +78,7 @@ Generally speaking, hero scenarios are implemented through customization through

### SDK-based Module

Docs are generated through playPS, please see [platyPS](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/help-generation.md#Installing-platyPS) for details. And developers should populate generated docs with examples.
Docs are generated through playPS, please see [platyPS](https://github.com/Azure/azure-powershell/blob/main/documentation/development-docs/help-generation.md#Installing-platyPS) for details. And developers should populate generated docs with examples.

### Auto-gen Module

Expand Down
6 changes: 3 additions & 3 deletions documentation/development-docs/vm-for-partners.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
If you need an Azure Virtual Machine with all the [prerequisites](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/azure-powershell-developer-guide.md#prerequisites) installed and ready to build and test Powershell Azure - follow the steps below.
If you need an Azure Virtual Machine with all the [prerequisites](https://github.com/Azure/azure-powershell/blob/main/documentation/development-docs/azure-powershell-developer-guide.md#prerequisites) installed and ready to build and test Powershell Azure - follow the steps below.

# Copy the PowerShell Azure VHD blob to your subscription and create a VM from it.

Expand Down Expand Up @@ -134,7 +134,7 @@ git config --global user.email "<Your email on GitHub>"
```
git config --global user.name "<Your name>"
```
Next, you will need to follow the steps [here](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/azure-powershell-developer-guide.md#environment-setup) to set up your local fork of Azure/azure-powershell.
Next, you will need to follow the steps [here](https://github.com/Azure/azure-powershell/blob/main/documentation/development-docs/azure-powershell-developer-guide.md#environment-setup) to set up your local fork of Azure/azure-powershell.

# Building and Running Tests
This image has been set up to build and run tests immediately. To build the project, run msbuild build.proj in the Developer Command Prompt for VS2015. Once this has completed, you can open your module in Visual Studio and start development there. To record tests, follow the instructions [here](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/azure-powershell-developer-guide.md#recordingrunning-tests).
This image has been set up to build and run tests immediately. To build the project, run msbuild build.proj in the Developer Command Prompt for VS2015. Once this has completed, you can open your module in Visual Studio and start development there. To record tests, follow the instructions [here](https://github.com/Azure/azure-powershell/blob/main/documentation/development-docs/azure-powershell-developer-guide.md#recordingrunning-tests).
Loading