Skip to content

Commit 740ba67

Browse files
Update template_update.yml
1 parent 6c2186a commit 740ba67

1 file changed

Lines changed: 0 additions & 26 deletions

File tree

.github/workflows/template_update.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -322,32 +322,6 @@ jobs:
322322
"$GITHUB_WORKSPACE/.cookiecutter.json" > "$GITHUB_WORKSPACE/tmp.json" \
323323
&& mv "$GITHUB_WORKSPACE/tmp.json" "$GITHUB_WORKSPACE/.cookiecutter.json"
324324
325-
- name: Remove extra blank lines
326-
shell: pwsh
327-
run: |
328-
if (-not (Test-Path "src")) {
329-
Write-Host "ℹ️ No src directory; skipping."
330-
exit 0
331-
}
332-
333-
$files = @()
334-
$files += Get-ChildItem -Path "src" -Recurse -Filter "*.cs" -File
335-
$files += Get-ChildItem -Path "src" -Recurse -Filter "*.csproj" -File
336-
337-
if ($files.Count -eq 0) {
338-
Write-Host "ℹ️ No .cs or .csproj files; skipping."
339-
exit 0
340-
}
341-
342-
foreach ($f in $files) {
343-
$text = Get-Content -Path $f.FullName -Raw
344-
$normalized = $text -replace "`r`n", "`n"
345-
$collapsed = [regex]::Replace($normalized, "`n{2,}", "`n`n")
346-
if ($collapsed -ne $normalized) {
347-
Set-Content -Path $f.FullName -Value $collapsed -NoNewline
348-
}
349-
}
350-
351325
- name: Commit changes
352326
id: commit
353327
shell: bash

0 commit comments

Comments
 (0)