You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(#140): enhance release automation and CI support
- Update `Update-NovaModuleVersion -ContinuousIntegration` to fallback to a patch bump when `HEAD` matches the latest tag
- Fix PSGallery publishing on fresh CI runners by bootstrapping the PSResourceGet repository store
- Add `Get-PSResourceRepositoryStoreDirectory` and `Initialize-PSGalleryRepository` functions
Copy file name to clipboardExpand all lines: src/private/release/GetNovaVersionLabelForBump.ps1
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,8 @@ function Get-NovaVersionLabelForBump {
2
2
[CmdletBinding()]
3
3
param(
4
4
[Parameter(Mandatory)][string]$ProjectRoot,
5
-
[string[]]$CommitMessages=@()
5
+
[string[]]$CommitMessages=@(),
6
+
[switch]$ContinuousIntegrationRequested
6
7
)
7
8
8
9
if ($CommitMessages.Count-gt0) {
@@ -18,6 +19,10 @@ function Get-NovaVersionLabelForBump {
18
19
}
19
20
20
21
if (-not (Test-GitRepositoryHasCommitsSinceLatestTag-ProjectRoot $ProjectRoot)) {
22
+
if ($ContinuousIntegrationRequested) {
23
+
return'Patch'
24
+
}
25
+
21
26
Stop-NovaOperation-Message 'Cannot bump version because there are no commits since the latest tag.'-ErrorId 'Nova.Workflow.NoCommitsSinceLatestTag'-Category InvalidOperation -TargetObject $ProjectRoot
@@ -524,6 +528,36 @@ Describe 'Nova command model - bump and CLI confirmation behavior' {
524
528
}
525
529
}
526
530
531
+
It 'Update-NovaModuleVersion -Preview -ContinuousIntegration -WhatIf still bumps from a tagged head with no new commits'-Skip:(-not [bool](Get-Command git -ErrorAction SilentlyContinue)) {
0 commit comments