Closed johlju closed 3 years ago
It should ask if GitVersion should be used and if so add a GitVersion.yaml. and it should ask for the name of the default branch in the line regex: ^main$
:
mode: ContinuousDelivery
next-version: 0.0.1
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:
tag: useBranchName
increment: Minor
regex: f(eature(s)?)?[\/-]
source-branches: ['master']
hotfix:
tag: fix
increment: Patch
regex: (hot)?fix(es)?[\/-]
source-branches: ['master']
ignore:
sha: []
merge-message-formats: {}
It should ask for the name of the default branch and add the following to the tasks publishRelease and sendChangelogPR in the pipeline job Deploy_Module. This was fixed in a recent PR.
ReleaseBranch: main
MainGitBranch: main
Example:
- task: PowerShell@2
name: publish_release
displayName: 'Publish Release'
inputs:
filePath: './build.ps1'
arguments: '-tasks publish'
pwsh: true
env:
GitHubToken: $(GitHubToken)
GalleryApiToken: $(GalleryApiToken)
ReleaseBranch: main
MainGitBranch: main
- task: PowerShell@2
name: send_changelog_PR
displayName: 'Send CHANGELOG PR'
inputs:
filePath: './build.ps1'
arguments: '-tasks Create_ChangeLog_GitHub_PR'
pwsh: true
env:
GitHubToken: $(GitHubToken)
ReleaseBranch: main
MainGitBranch: main
The module script file should be empty, it should not use the template which dot-sources a lot of stuff: https://github.com/gaelcolas/Sampler/blob/master/Sampler/Templates/Sampler/module.template
This should either be removed when using SimpleModule (preferably as the template used is 'simple'), or changed to real values (even if it is commented out) not have Sampler/Sampler.psd1 which can be misleading if there is a source folder.
The build task Publish_GitHub_Wiki_Content
must be removed, unless configured correctly.
Module manifest is not prepared for preview releases. These two are commented.
PrivateData = @{
PSData = @{
# ReleaseNotes of this module
ReleaseNotes = ''
# Prerelease string of this module
Prerelease = ''
} # End of PSData hashtable
} # End of PrivateData hashtable
Module manifest should be updated to use these:
# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @()
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = @()
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @()
# Variables to export from this module
VariablesToExport = @()
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = @()
# DSC resources to export from this module
DscResourcesToExport = @()
When using the template type
'SimpleModule'
it should not add:In RequiredModules.psd1
In build.yaml
When using the template type
'SimpleModule'
it should ask for values for:In azure-pipelines.yml it should ask for the name of the default branch.
and for
In azure-pipelines.yml it should ask for the name of the account name that owns the upstream repository (so that it does not try to deploy in forks).