Skip to content

Commit

Permalink
Updated pipeline files to support change of default branch to main (#469
Browse files Browse the repository at this point in the history
)
  • Loading branch information
johlju authored Sep 29, 2021
1 parent c1c255c commit 46e06ed
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 13 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ For older change log history see the [historic changelog](HISTORIC_CHANGELOG.md)

### Changed

- xExchange
- Renamed default branch to `main` ([issue #465](https://github.com/dsccommunity/xExchange/issues/465)).
- xExchOwaVirtualDirectoryInternal
- Added additional parameter SetPhotoEnabled
- RequieredModules
- RequiredModules
- Change pester reference to 4.10.1
Pester 5 was released and is a breaking change,
so we need to pin 4.10.1.
Expand Down
5 changes: 3 additions & 2 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
mode: ContinuousDelivery
next-version: 1.31.0
major-version-bump-message: '\s?(breaking|major|breaking\schange)'
minor-version-bump-message: '\s?(add|feature|minor)'
major-version-bump-message: '(breaking\schange|breaking|major)\b'
minor-version-bump-message: '(adds?|features?|minor)\b'
patch-version-bump-message: '\s?(fix|patch)'
no-bump-message: '\+semver:\s?(none|skip)'
assembly-informational-format: '{NuGetVersionV2}+Sha.{Sha}.Date.{CommitDate}'
branches:
master:
tag: preview
regex: ^main$
pull-request:
tag: PR
feature:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# xExchange

[![Build Status](https://dev.azure.com/dsccommunity/xExchange/_apis/build/status/dsccommunity.xExchange?branchName=master)](https://dev.azure.com/dsccommunity/xExchange/_build/latest?definitionId=15&branchName=master)
![Azure DevOps coverage (branch)](https://img.shields.io/azure-devops/coverage/dsccommunity/xExchange/15/master)
[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/dsccommunity/xExchange/15/master)](https://dsccommunity.visualstudio.com/xExchange/_test/analytics?definitionId=15&contextType=build)
[![Build Status](https://dev.azure.com/dsccommunity/xExchange/_apis/build/status/dsccommunity.xExchange?branchName=main)](https://dev.azure.com/dsccommunity/xExchange/_build/latest?definitionId=15&branchName=main)
![Azure DevOps coverage (branch)](https://img.shields.io/azure-devops/coverage/dsccommunity/xExchange/15/main)
[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/dsccommunity/xExchange/15/main)](https://dsccommunity.visualstudio.com/xExchange/_test/analytics?definitionId=15&contextType=build)
[![PowerShell Gallery (with prereleases)](https://img.shields.io/powershellgallery/vpre/xExchange?label=xExchange%20Preview)](https://www.powershellgallery.com/packages/xExchange/)
[![PowerShell Gallery](https://img.shields.io/powershellgallery/v/xExchange?label=xExchange)](https://www.powershellgallery.com/packages/xExchange/)

Expand All @@ -17,7 +17,7 @@ questions or comments.

## 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
15 changes: 10 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@

trigger:
branches:
include:
- master
- main
paths:
exclude:
- CHANGELOG.md
include:
- source/*
tags:
include:
- "v*"
Expand Down Expand Up @@ -117,12 +118,12 @@ stages:

- stage: Deploy
dependsOn: Test
# Only execute deploy stage if we're on master and previous stage succeeded
# Only execute deploy stage if we're on main and previous stage succeeded
condition: |
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 @@ -150,6 +151,8 @@ stages:
env:
GitHubToken: $(GitHubToken)
GalleryApiToken: $(GalleryApiToken)
ReleaseBranch: main
MainGitBranch: main
- task: PowerShell@2
name: sendChangelogPR
displayName: 'Send Changelog PR'
Expand All @@ -159,3 +162,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 @@ -62,6 +62,7 @@ DscTest:
- output
- Examples
ExcludeModuleFile:
MainGitBranch: main

Resolve-Dependency:
Gallery: 'PSGallery'
Expand Down
2 changes: 1 addition & 1 deletion source/xExchange.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource')

# A URL to the license for this module.
LicenseUri = 'https://github.com/dsccommunity/xExchange/blob/master/LICENSE'
LicenseUri = 'https://github.com/dsccommunity/xExchange/blob/main/LICENSE'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/dsccommunity/xExchange'
Expand Down

0 comments on commit 46e06ed

Please sign in to comment.