Skip to content

Commit

Permalink
Updated pipeline files to support change of master to main
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju committed Dec 31, 2020
1 parent 5917be8 commit a95d107
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -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/)

Expand All @@ -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/).
Expand Down
2 changes: 1 addition & 1 deletion RequiredModules.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

InvokeBuild = 'latest'
PSScriptAnalyzer = 'latest'
Pester = 'latest'
Pester = '4.10.1'
Plaster = 'latest'
ModuleBuilder = '1.0.0'
ChangelogManagement = 'latest'
Expand Down
8 changes: 6 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
trigger:
branches:
include:
- master
- main
paths:
include:
- source/*
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -282,6 +282,8 @@ stages:
env:
GitHubToken: $(GitHubToken)
GalleryApiToken: $(GalleryApiToken)
ReleaseBranch: main
MainGitBranch: main
- task: PowerShell@2
name: sendChangelogPR
displayName: 'Send Changelog PR'
Expand All @@ -291,3 +293,5 @@ stages:
pwsh: true
env:
GitHubToken: $(GitHubToken)
ReleaseBranch: main
MainGitBranch: main
1 change: 1 addition & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ DscTest:
- output
ExcludeModuleFile:
- Modules/DscResource.Common
MainGitBranch: main


Resolve-Dependency:
Expand Down
7 changes: 3 additions & 4 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion source/FileSystemDsc.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit a95d107

Please sign in to comment.