From 8364df3f2a879f82e0d003617f1efe0de3c1ce46 Mon Sep 17 00:00:00 2001 From: Daniel Scott-Raynsford Date: Mon, 28 Dec 2020 20:53:50 +1300 Subject: [PATCH] Updated pipeline files to support change of master to main - fixes #84 (#85) --- CHANGELOG.md | 1 + GitVersion.yml | 10 ++++------ README.md | 8 ++++---- azure-pipelines.yml | 6 +++++- build.yaml | 1 + source/WSManDsc.psd1 | 2 +- source/WikiSource/Home.md | 2 +- 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4f3d0b..05d1308 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 coverage - Fixes [Issue #78](https://github.com/dsccommunity/WSManDsc/issues/78). - WSManDsc - Automatically publish documentation to GitHub Wiki - Fixes [Issue #82](https://github.com/dsccommunity/WSManDsc/issues/82). +- Renamed `master` branch to `main` - Fixes [Issue #82](https://github.com/dsccommunity/WSManDsc/issues/82). ## [3.1.1] - 2020-01-31 diff --git a/GitVersion.yml b/GitVersion.yml index f011744..fcbaca9 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -8,19 +8,17 @@ assembly-informational-format: '{NuGetVersionV2}+Sha.{Sha}.Date.{CommitDate}' branches: master: tag: preview + regex: ^master$|^main$ pull-request: tag: PR feature: tag: useBranchName increment: Minor - regex: f(eature(s)?)?\/-] - source-branches: ['master'] + regex: f(eature(s)?)?[\/-] + source-branches: ['main'] hotfix: tag: fix increment: Patch regex: (hot)?fix(es)?[\/-] - source-branches: ['master'] - -ignore: - sha: [] + source-branches: ['main'] merge-message-formats: {} diff --git a/README.md b/README.md index 7a9e259..c484e46 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # WSManDsc -[![Build Status](https://dev.azure.com/dsccommunity/WsManDsc/_apis/build/status/dsccommunity.WSManDsc?branchName=master)](https://dev.azure.com/dsccommunity/WsManDsc/_build/latest?definitionId=6&branchName=master) -![Code Coverage](https://img.shields.io/azure-devops/coverage/dsccommunity/WSManDsc/6/master) -[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/dsccommunity/WSManDsc/6/master)](https://dsccommunity.visualstudio.com/WSManDsc/_test/analytics?definitionId=6&contextType=build) +[![Build Status](https://dev.azure.com/dsccommunity/WsManDsc/_apis/build/status/dsccommunity.WSManDsc?branchName=main)](https://dev.azure.com/dsccommunity/WsManDsc/_build/latest?definitionId=6&branchName=main) +![Code Coverage](https://img.shields.io/azure-devops/coverage/dsccommunity/WSManDsc/6/main) +[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/dsccommunity/WSManDsc/6/main)](https://dsccommunity.visualstudio.com/WSManDsc/_test/analytics?definitionId=6&contextType=build) [![PowerShell Gallery (with prereleases)](https://img.shields.io/powershellgallery/vpre/WSManDsc?label=WSManDsc%20Preview)](https://www.powershellgallery.com/packages/WSManDsc/) [![PowerShell Gallery](https://img.shields.io/powershellgallery/v/WSManDsc?label=WSManDsc)](https://www.powershellgallery.com/packages/WSManDsc/) @@ -19,7 +19,7 @@ This project has adopted this [Code of Conduct](CODE_OF_CONDUCT.md). ## Releases -For each merge to the branch `master` a preview release will be +For each merge to the branch `main` a preview release will be deployed to [PowerShell Gallery](https://www.powershellgallery.com/). Periodically a release version tag will be pushed which will deploy a full release to [PowerShell Gallery](https://www.powershellgallery.com/). diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 75c2db6..1358655 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,7 +1,7 @@ trigger: branches: include: - - master + - main paths: include: - source/* @@ -271,6 +271,8 @@ stages: env: GitHubToken: $(GitHubToken) GalleryApiToken: $(GalleryApiToken) + ReleaseBranch: main + MainGitBranch: main - task: PowerShell@2 name: sendChangelogPR @@ -281,3 +283,5 @@ stages: pwsh: true env: GitHubToken: $(GitHubToken) + ReleaseBranch: main + MainGitBranch: main diff --git a/build.yaml b/build.yaml index 4caf15f..9f1349d 100644 --- a/build.yaml +++ b/build.yaml @@ -73,6 +73,7 @@ DscTest: - output ExcludeModuleFile: - Modules/DscResource.Common + MainGitBranch: main Resolve-Dependency: Gallery: 'PSGallery' diff --git a/source/WSManDsc.psd1 b/source/WSManDsc.psd1 index ca594d9..f405952 100644 --- a/source/WSManDsc.psd1 +++ b/source/WSManDsc.psd1 @@ -88,7 +88,7 @@ Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResource', 'WSMan') # A URL to the license for this module. - LicenseUri = 'https://github.com/dsccommunity/WSManDsc/blob/master/LICENSE' + LicenseUri = 'https://github.com/dsccommunity/WSManDsc/blob/main/LICENSE' # A URL to the main website for this project. ProjectUri = 'https://github.com/dsccommunity/WSManDsc' diff --git a/source/WikiSource/Home.md b/source/WikiSource/Home.md index 10c2588..25afb9e 100644 --- a/source/WikiSource/Home.md +++ b/source/WikiSource/Home.md @@ -32,4 +32,4 @@ Get-DscResource -Module WSManDsc ## Change Log -A full list of changes in each version can be found in the [change log](https://github.com/dsccommunity/WSManDsc/blob/master/CHANGELOG.md). +A full list of changes in each version can be found in the [change log](https://github.com/dsccommunity/WSManDsc/blob/main/CHANGELOG.md).