Skip to content

Commit

Permalink
chore: Additional logs
Browse files Browse the repository at this point in the history
  • Loading branch information
samtrion committed May 15, 2024
1 parent 3c57fd3 commit 1fa9513
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/update-packages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,16 @@ function Update-Readme {
[Parameter(Mandatory = $true)]
[string] $packagesContent
)
Write-Host "Updating README files"
Write-Host "Updating README files for $workingDirectoy"

$tagStart = '<!-- packages:start -->'
$tagStartLength = $tagStart.Length
$tagEnd = '<!-- packages:end -->'

$readmeFiles = Get-ChildItem -Path $workingDirectory -Filter 'README.*' -Recurse
$readmeFiles = Get-ChildItem -Path $workingDirectory -Filter 'README.*' -Recurse -Force

foreach ($readmeFile in $readmeFiles) {
Write-Host "Verifying $($readmeFile.FullName)"
$readmeContent = Get-Content -Path $readmeFile.FullName -Raw

$startIndex = $readmeContent.IndexOf($tagStart)
Expand All @@ -99,7 +100,7 @@ function Update-Readme {

$readmeContent = $readmeContent.Replace($readmeContent.Substring($startIndex, $endIndex - $startIndex), $packagesContent)

Write-Host "Updating $readmeFile.FullName"
Write-Host "Updating $($readmeFile.FullName)"
Set-Content -Path $readmeFile.FullName -Value $readmeContent -NoNewline
}
}
Expand Down

0 comments on commit 1fa9513

Please sign in to comment.