pipeline file changes

This commit is contained in:
Brett Hewitson 2022-12-29 15:23:09 +10:00
parent 7c3dd426c9
commit 73740b03d6

View file

@ -42,15 +42,15 @@ steps:
# iterate the search path (and sub directories) looking for files that match the search filter # iterate the search path (and sub directories) looking for files that match the search filter
Get-ChildItem -Path $PathToSearch -Filter $SearchFilter -Recurse | % { Get-ChildItem -Path $PathToSearch -Filter $SearchFilter -Recurse | % {
Write-Host " -> Checking $($_.FullName)" #Write-Host " -> Checking $($_.FullName)"
# remove the read-only bit on the file # remove the read-only bit on the file
Set-ItemProperty $_.FullName -name IsReadOnly -value $false #Set-ItemProperty $_.FullName -name IsReadOnly -value $false
# run the regex replace # run the regex replace
$content = Get-Content $_.FullName #$content = Get-Content $_.FullName
$content = Replace-Version -content $content -version $version -attribute 'AssemblyVersion' #$content = Replace-Version -content $content -version $version -attribute 'AssemblyVersion'
$content = Replace-Version -content $content -version $fileVersion -attribute 'AssemblyFileVersion' #$content = Replace-Version -content $content -version $fileVersion -attribute 'AssemblyFileVersion'
$content | Set-Content $_.FullName -Encoding UTF8 #$content | Set-Content $_.FullName -Encoding UTF8
} }
pwsh: true pwsh: true