Compare commits

...

2 Commits

Author SHA1 Message Date
Maksym Sadovnychyy
463eff3b24 Merge remote-tracking branch 'origin/dev' 2026-03-01 11:59:09 +01:00
Maksym Sadovnychyy
31c560b029 (feature): repo utils update 2026-03-01 11:58:46 +01:00
3 changed files with 17 additions and 7 deletions

View File

@ -282,14 +282,14 @@ function Test-PluginRunnable {
$allowedBranches = Get-PluginBranches -Plugin $Plugin $allowedBranches = Get-PluginBranches -Plugin $Plugin
if ($allowedBranches.Count -eq 0) { if ($allowedBranches.Count -eq 0) {
if ($WriteLogs) { if ($WriteLogs) {
Write-Log -Level "WARN" -Message "Skipping plugin '$($Plugin.Name)' because no publish branches are configured." Write-Log -Level "INFO" -Message "Skipping plugin '$($Plugin.Name)' because no publish branches are configured."
} }
return $false return $false
} }
if (-not ($allowedBranches -contains $SharedSettings.CurrentBranch)) { if (-not ($allowedBranches -contains $SharedSettings.CurrentBranch)) {
if ($WriteLogs) { if ($WriteLogs) {
Write-Log -Level "WARN" -Message "Skipping plugin '$($Plugin.Name)' on branch '$($SharedSettings.CurrentBranch)'." Write-Log -Level "INFO" -Message "Skipping plugin '$($Plugin.Name)' on branch '$($SharedSettings.CurrentBranch)'."
} }
return $false return $false
} }

View File

@ -155,7 +155,8 @@ else {
} }
if (-not $releaseStageInitialized) { if (-not $releaseStageInitialized) {
Write-Log -Level "WARN" -Message "No release plugins executed for branch '$($engineContext.CurrentBranch)'." $noReleasePluginsLogLevel = if ($engineContext.IsNonReleaseBranch) { "INFO" } else { "WARN" }
Write-Log -Level $noReleasePluginsLogLevel -Message "No release plugins executed for branch '$($engineContext.CurrentBranch)'."
} }
#endregion #endregion
@ -174,7 +175,7 @@ Write-Log -Level "INFO" -Message "Artifacts location: $($engineContext.Artifacts
if ($engineContext.IsNonReleaseBranch) { if ($engineContext.IsNonReleaseBranch) {
$preferredReleaseBranch = Get-PreferredReleaseBranch -EngineContext $engineContext $preferredReleaseBranch = Get-PreferredReleaseBranch -EngineContext $engineContext
Write-Log -Level "WARN" -Message "To execute release-stage plugins, rerun from an allowed release branch such as '$preferredReleaseBranch'." Write-Log -Level "INFO" -Message "To execute release-stage plugins, rerun from an allowed release branch such as '$preferredReleaseBranch'."
} }
#endregion #endregion

View File

@ -23,6 +23,7 @@
- repository.sourceSubdirectory: Folder copied into the target directory - repository.sourceSubdirectory: Folder copied into the target directory
- repository.preserveFileName: Existing file name to preserve in subfolders - repository.preserveFileName: Existing file name to preserve in subfolders
- repository.cloneDepth: Depth used for git clone - repository.cloneDepth: Depth used for git clone
- repository.skippedRelativeDirectories: Relative directories to exclude from phase-two refresh
#> #>
[CmdletBinding()] [CmdletBinding()]
@ -49,9 +50,6 @@ else {
} }
$currentScriptPath = [System.IO.Path]::GetFullPath($MyInvocation.MyCommand.Path) $currentScriptPath = [System.IO.Path]::GetFullPath($MyInvocation.MyCommand.Path)
$selfUpdateDirectory = 'Update-RepoUtils' $selfUpdateDirectory = 'Update-RepoUtils'
$skippedRelativeDirectories = @(
[System.IO.Path]::Combine('Release-Package', 'CustomPlugins')
)
#region Import Modules #region Import Modules
@ -85,6 +83,17 @@ $dryRun = if ($null -ne $settings.dryRun) { [bool]$settings.dryRun } else { $fal
$sourceSubdirectory = if ($settings.repository.sourceSubdirectory) { $settings.repository.sourceSubdirectory } else { 'src' } $sourceSubdirectory = if ($settings.repository.sourceSubdirectory) { $settings.repository.sourceSubdirectory } else { 'src' }
$preserveFileName = if ($settings.repository.preserveFileName) { $settings.repository.preserveFileName } else { 'scriptsettings.json' } $preserveFileName = if ($settings.repository.preserveFileName) { $settings.repository.preserveFileName } else { 'scriptsettings.json' }
$cloneDepth = if ($settings.repository.cloneDepth) { [int]$settings.repository.cloneDepth } else { 1 } $cloneDepth = if ($settings.repository.cloneDepth) { [int]$settings.repository.cloneDepth } else { 1 }
$skippedRelativeDirectories = if ($settings.repository.skippedRelativeDirectories) {
@(
$settings.repository.skippedRelativeDirectories |
ForEach-Object {
([string]$_).Replace('/', [System.IO.Path]::DirectorySeparatorChar).Replace('\', [System.IO.Path]::DirectorySeparatorChar)
}
)
}
else {
@([System.IO.Path]::Combine('Release-Package', 'CustomPlugins'))
}
#endregion #endregion