mirror of
https://github.com/tribufu/ServerManagers
synced 2026-06-01 09:42:39 +00:00
pipeline file changes
This commit is contained in:
parent
7c378ae9a3
commit
fc459b2366
1 changed files with 4 additions and 6 deletions
|
|
@ -24,12 +24,12 @@ steps:
|
||||||
$exitFunction = $false
|
$exitFunction = $false
|
||||||
$content | % {
|
$content | % {
|
||||||
if ($_ -match 'exclude from semantic versioning') {
|
if ($_ -match 'exclude from semantic versioning') {
|
||||||
Write-Host " * Skipping $attribute due to exclude"
|
Write-Host " * Skipping $attribute due to exclude"
|
||||||
$exitFunction = $true
|
$exitFunction = $true
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_ -match 'include semantic versioning' -and $_ -notmatch "include semantic versioning - $ApplicationName") {
|
if ($_ -match 'include semantic versioning' -and $_ -notmatch "include semantic versioning - $ApplicationName") {
|
||||||
Write-Host " * Skipping $attribute due to include not matching"
|
Write-Host " * Skipping $attribute due to include not matching"
|
||||||
$exitFunction = $true
|
$exitFunction = $true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -46,14 +46,14 @@ steps:
|
||||||
if ($_ -match $Pattern) {
|
if ($_ -match $Pattern) {
|
||||||
$versionReplaced = $true
|
$versionReplaced = $true
|
||||||
$_ = $_ -replace [regex]::Escape($Matches[0]),$versionAttribute
|
$_ = $_ -replace [regex]::Escape($Matches[0]),$versionAttribute
|
||||||
Write-Host " * Replaced $($Matches[0]) with $versionAttribute"
|
Write-Host " * Replaced $($Matches[0]) with $versionAttribute"
|
||||||
}
|
}
|
||||||
$_
|
$_
|
||||||
}
|
}
|
||||||
|
|
||||||
if (-not $versionReplaced) {
|
if (-not $versionReplaced) {
|
||||||
$content += [Environment]::NewLine + $versionAttribute
|
$content += [Environment]::NewLine + $versionAttribute
|
||||||
Write-Host " * Added $versionAttribute to end of content"
|
Write-Host " * Added $versionAttribute to end of content"
|
||||||
}
|
}
|
||||||
|
|
||||||
return $content
|
return $content
|
||||||
|
|
@ -63,8 +63,6 @@ steps:
|
||||||
return [string]::Join('.',($extractedBuildNumbers | select -First ($numberOfVersions)))
|
return [string]::Join('.',($extractedBuildNumbers | select -First ($numberOfVersions)))
|
||||||
}
|
}
|
||||||
|
|
||||||
$ErrorActionPreference = 'Stop'
|
|
||||||
|
|
||||||
if ($BuildNumber -match $Pattern -ne $true) {
|
if ($BuildNumber -match $Pattern -ne $true) {
|
||||||
Write-Host "Could not extract a version from [$BuildNumber] using pattern [$Pattern]"
|
Write-Host "Could not extract a version from [$BuildNumber] using pattern [$Pattern]"
|
||||||
exit 2
|
exit 2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue