From 2d83b6d6aa1818299858bc95b0e8291c0e640560 Mon Sep 17 00:00:00 2001 From: Johan Ljunggren Date: Thu, 31 Dec 2020 21:10:56 +0100 Subject: [PATCH] Updated pipeline files to support change of master to main --- CHANGELOG.md | 1 + GitVersion.yml | 5 +++-- README.md | 10 +++++----- RequiredModules.psd1 | 2 +- azure-pipelines.yml | 8 ++++++-- build.yaml | 1 + codecov.yml | 7 +++---- ...leSystemAccessRule_SetPermissionOnFolder_Config.ps1 | 2 +- source/FileSystemDsc.psd1 | 2 +- 9 files changed, 22 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c45f286..3183ff0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - FileSystemDsc + - Renamed `master` branch to `main` ([issue #11](https://github.com/dsccommunity/FileSystemDsc/issues/11)). - Only run the CI pipeline on branch `master` when there are changes to files inside the `source` folder. - The regular expression for `minor-version-bump-message` in the file diff --git a/GitVersion.yml b/GitVersion.yml index a027df9..0e7be6d 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -8,18 +8,19 @@ assembly-informational-format: '{NuGetVersionV2}+Sha.{Sha}.Date.{CommitDate}' branches: master: tag: preview + regex: ^main$ pull-request: tag: PR feature: tag: useBranchName increment: Minor regex: f(eature(s)?)?[\/-] - source-branches: ['master'] + source-branches: ['main'] hotfix: tag: fix increment: Patch regex: (hot)?fix(es)?[\/-] - source-branches: ['master'] + source-branches: ['main'] ignore: sha: [] diff --git a/README.md b/README.md index a5706b3..102240e 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # FileSystemDsc -[![Build Status](https://dev.azure.com/dsccommunity/FileSystemDsc/_apis/build/status/dsccommunity.FileSystemDsc?branchName=master)](https://dev.azure.com/dsccommunity/FileSystemDsc/_build/latest?definitionId=20&branchName=master) -![Azure DevOps coverage (branch)](https://img.shields.io/azure-devops/coverage/dsccommunity/FileSystemDsc/20/master) -[![codecov](https://codecov.io/gh/dsccommunity/FileSystemDsc/branch/master/graph/badge.svg)](https://codecov.io/gh/dsccommunity/FileSystemDsc) -[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/dsccommunity/FileSystemDsc/20/master)](https://dsccommunity.visualstudio.com/FileSystemDsc/_test/analytics?definitionId=20&contextType=build) +[![Build Status](https://dev.azure.com/dsccommunity/FileSystemDsc/_apis/build/status/dsccommunity.FileSystemDsc?branchName=main)](https://dev.azure.com/dsccommunity/FileSystemDsc/_build/latest?definitionId=20&branchName=main) +![Azure DevOps coverage (branch)](https://img.shields.io/azure-devops/coverage/dsccommunity/FileSystemDsc/20/main) +[![codecov](https://codecov.io/gh/dsccommunity/FileSystemDsc/branch/main/graph/badge.svg)](https://codecov.io/gh/dsccommunity/FileSystemDsc) +[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/dsccommunity/FileSystemDsc/20/main)](https://dsccommunity.visualstudio.com/FileSystemDsc/_test/analytics?definitionId=20&contextType=build) [![PowerShell Gallery (with prereleases)](https://img.shields.io/powershellgallery/vpre/FileSystemDsc?label=FileSystemDsc%20Preview)](https://www.powershellgallery.com/packages/FileSystemDsc/) [![PowerShell Gallery](https://img.shields.io/powershellgallery/v/FileSystemDsc?label=FileSystemDsc)](https://www.powershellgallery.com/packages/FileSystemDsc/) @@ -16,7 +16,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/RequiredModules.psd1 b/RequiredModules.psd1 index a9de93d..627a1bf 100644 --- a/RequiredModules.psd1 +++ b/RequiredModules.psd1 @@ -9,7 +9,7 @@ InvokeBuild = 'latest' PSScriptAnalyzer = 'latest' - Pester = 'latest' + Pester = '4.10.1' Plaster = 'latest' ModuleBuilder = '1.0.0' ChangelogManagement = 'latest' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 736ea93..e54febd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,7 +1,7 @@ trigger: branches: include: - - master + - main paths: include: - source/* @@ -254,7 +254,7 @@ stages: and( succeeded(), or( - eq(variables['Build.SourceBranch'], 'refs/heads/master'), + eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/tags/') ), contains(variables['System.TeamFoundationCollectionUri'], 'dsccommunity') @@ -282,6 +282,8 @@ stages: env: GitHubToken: $(GitHubToken) GalleryApiToken: $(GalleryApiToken) + ReleaseBranch: main + MainGitBranch: main - task: PowerShell@2 name: sendChangelogPR displayName: 'Send Changelog PR' @@ -291,3 +293,5 @@ stages: pwsh: true env: GitHubToken: $(GitHubToken) + ReleaseBranch: main + MainGitBranch: main diff --git a/build.yaml b/build.yaml index 63a0a40..8ecedc1 100644 --- a/build.yaml +++ b/build.yaml @@ -74,6 +74,7 @@ DscTest: - output ExcludeModuleFile: - Modules/DscResource.Common + MainGitBranch: main Resolve-Dependency: diff --git a/codecov.yml b/codecov.yml index 5341008..6c9277e 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,11 +1,10 @@ codecov: - notify: require_ci_to_pass: no - # master should be the baseline for reporting - branch: master + # main should be the baseline for reporting + branch: main comment: - layout: 'reach, diff' + layout: "reach, diff" behavior: default coverage: diff --git a/source/Examples/Resources/FileSystemAccessRule/1-FileSystemAccessRule_SetPermissionOnFolder_Config.ps1 b/source/Examples/Resources/FileSystemAccessRule/1-FileSystemAccessRule_SetPermissionOnFolder_Config.ps1 index fa20dd5..5ed02b6 100644 --- a/source/Examples/Resources/FileSystemAccessRule/1-FileSystemAccessRule_SetPermissionOnFolder_Config.ps1 +++ b/source/Examples/Resources/FileSystemAccessRule/1-FileSystemAccessRule_SetPermissionOnFolder_Config.ps1 @@ -5,7 +5,7 @@ .COMPANYNAME DSC Community .COPYRIGHT DSC Community contributors. All rights reserved. .TAGS DSCConfiguration -.LICENSEURI https://github.com/dsccommunity/FileSystemDsc/blob/master/LICENSE +.LICENSEURI https://github.com/dsccommunity/FileSystemDsc/blob/main/LICENSE .PROJECTURI https://github.com/dsccommunity/FileSystemDsc .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png .RELEASENOTES diff --git a/source/FileSystemDsc.psd1 b/source/FileSystemDsc.psd1 index ea5103c..1f9884e 100644 --- a/source/FileSystemDsc.psd1 +++ b/source/FileSystemDsc.psd1 @@ -51,7 +51,7 @@ Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') # A URL to the license for this module. - LicenseUri = 'https://github.com/dsccommunity/FileSystemDsc/blob/master/LICENSE' + LicenseUri = 'https://github.com/dsccommunity/FileSystemDsc/blob/main/LICENSE' # A URL to the main website for this project. ProjectUri = 'https://github.com/dsccommunity/FileSystemDsc'