зеркало из https://github.com/microsoft/PSRule.git
Update to contributing docs (#361)
This commit is contained in:
Родитель
5bc52b4190
Коммит
b57ee1cf46
|
@ -0,0 +1,9 @@
|
|||
# Microsoft Open Source Code of Conduct
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
||||
|
||||
Resources:
|
||||
|
||||
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
|
||||
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
|
||||
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
|
|
@ -30,6 +30,8 @@ Check out the links below to get started.
|
|||
- GitHub Help:
|
||||
- [Git and GitHub learning resources][learn-git].
|
||||
- [GitHub Flow Guide][github-flow].
|
||||
- [Fork a repo][github-fork].
|
||||
- [About Pull Requests][github-pr].
|
||||
|
||||
## Contributing to issues
|
||||
|
||||
|
@ -43,6 +45,26 @@ Check out the links below to get started.
|
|||
- Be prepared to discuss a feature and take feedback.
|
||||
- Include unit tests and updates documentation to complement the change.
|
||||
|
||||
When you are ready to contribute a fix or feature:
|
||||
|
||||
- Start by [forking the PSRule repo][github-fork].
|
||||
- Create a new branch from master in your fork.
|
||||
- Add commits in your branch.
|
||||
- If you have updated module code also update `CHANGELOG.md`.
|
||||
- You don't need to update the `CHANGELOG.md` for changes to unit tests or documentation.
|
||||
- Try building your changes locally. See [building from source][build] for instructions.
|
||||
- [Create a pull request][github-pr-create] to merge changes into the PSRule `master` branch.
|
||||
- If you are _ready_ for your changes to be reviewed create a _pull request_.
|
||||
- If you are _not ready_ for your changes to be reviewed, create a _draft pull request_.
|
||||
- An continuous integration (CI) process will automatically build your changes.
|
||||
- You changes must build successfully to be merged.
|
||||
- If you have any build errors, push new commits to your branch.
|
||||
- Avoid using forced pushes or squashing changes while in review, as this makes reviewing your changes harder.
|
||||
|
||||
[learn-git]: https://help.github.com/en/articles/git-and-github-learning-resources
|
||||
[github-flow]: https://guides.github.com/introduction/flow/
|
||||
[github-signup]: https://github.com/signup/free
|
||||
[github-fork]: https://help.github.com/en/github/getting-started-with-github/fork-a-repo
|
||||
[github-pr]: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests
|
||||
[github-pr-create]: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork
|
||||
[build]: docs/scenarios/install-instructions.md#building-from-source
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# Note:
|
||||
# This manually builds the project locally
|
||||
|
||||
. ./.azure-pipelines/pipeline-deps.ps1
|
||||
Invoke-Build Test -AssertStyle Client
|
||||
|
||||
Write-Host "If no build errors occured. The module has been saved to out/modules/PSRule"
|
|
@ -50,6 +50,34 @@ code --install-extension bewhite.psrule-vscode-preview
|
|||
|
||||
For detailed instructions, follow the steps in the [Visual Studio Code documentation][vscode-ext-gallery].
|
||||
|
||||
## Building from source
|
||||
|
||||
To build this module from source run `./build.ps1`.
|
||||
This build script will compile the module and documentation then output the result into `out/modules/PSRule`.
|
||||
|
||||
The following PowerShell modules will be automatically downloaded if the required versions are not present:
|
||||
|
||||
- PlatyPS
|
||||
- Pester
|
||||
- PSScriptAnalyzer
|
||||
- PowerShellGet
|
||||
- PackageManagement
|
||||
- InvokeBuild
|
||||
|
||||
These additional modules are only required for building PSRule and are not required for running PSRule.
|
||||
|
||||
If you are on a network that does not permit Internet access to the PowerShell Gallery, download these modules on an alternative device that has access.
|
||||
The following script can be used to download the required modules to an alternative device.
|
||||
After downloading the modules copy the module directories to devices with restricted Internet access.
|
||||
|
||||
```powershell
|
||||
# Save modules, in the .\modules directory
|
||||
Save-Module -Name PlatyPS, Pester, PSScriptAnalyzer, PowerShellGet, PackageManagement, InvokeBuild -Repository PSGallery -Path '.\modules';
|
||||
```
|
||||
|
||||
Additionally .NET Core SDK v2.1 is required. .NET Core will not be automatically downloaded and installed.
|
||||
To download and install .NET Core SDK see [Download .NET Core 2.1](https://dotnet.microsoft.com/download/dotnet-core/2.1).
|
||||
|
||||
[module-psrule]: https://www.powershellgallery.com/packages/PSRule
|
||||
[ext-psrule]: https://marketplace.visualstudio.com/items?itemName=bewhite.psrule-vscode-preview
|
||||
[vscode-ext-gallery]: https://code.visualstudio.com/docs/editor/extension-gallery
|
||||
|
|
Загрузка…
Ссылка в новой задаче