#requires -Version 7.0
# Read-only verification; does not stage files, change remotes or print credentials.
$ErrorActionPreference = 'Stop'
$taskRoot = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..'))
Push-Location $taskRoot
try {
git rev-parse --is-inside-work-tree | Out-Null
if ($LASTEXITCODE -ne 0) { throw 'Not a Git working tree.' }
$taskIgnored = @(
'Server/XFEWarframe.Server/bin/Debug/server.dll', 'Client/XFEWarframe.Player/obj/project.assets.json',
'.vs/workspace.suo', 'artifacts/package/Client/XFEWarframe.Player.exe',
'Server/runtime/server.json', 'runtime/state.json', 'Server/runtime/inventory-backups/save.json',
'test/ProfilesRoot/Profiles/SystemProfile.json', 'test/Credentials/login.dat',
'.env', '.env.local', 'local.pfx', 'local.key', 'server.log', 'TestResults/result.trx',
'scripts/__pycache__/audit.pyc'
)
foreach ($taskPath in $taskIgnored) {
git check-ignore -q --no-index -- $taskPath
if ($LASTEXITCODE -ne 0) { throw "Generated or private path is not ignored: $taskPath" }
}
$taskSources = @(
'Client/XFEWarframe.Client/Runtime/RuntimeControlServer.cs',
'Client/XFEWarframe.Player/Profiles/CrossVersionProfiles/SystemProfile.cs',
'Client/SharedUI/Localization/translations.json', 'Server/data/inventory-defaults.json',
'Client/XFEWarframe.Player/Properties/launchSettings.json', '.env.example'
)
foreach ($taskPath in $taskSources) {
git check-ignore -q --no-index -- $taskPath
if ($LASTEXITCODE -eq 0) { throw "Required source is ignored: $taskPath" }
}
$taskTrackedPrivate = @(git ls-files --cached --ignored --exclude-standard)
if ($taskTrackedPrivate.Count) { throw ('Ignored paths are already tracked: ' + ($taskTrackedPrivate -join ', ')) }
git -c core.safecrlf=false diff --check
if ($LASTEXITCODE -ne 0) { throw 'Whitespace errors in the working diff.' }
git -c core.safecrlf=false diff --cached --check
if ($LASTEXITCODE -ne 0) { throw 'Whitespace errors in the staged diff.' }
Write-Output "PASS Git: $($taskIgnored.Count) private/generated paths ignored; $($taskSources.Count) source paths retained; no ignored files tracked; diff checks passed."
} finally { Pop-Location }
#requires -Version 7.0
# Read-only verification; does not stage files, change remotes or print credentials.
$ErrorActionPreference = 'Stop'
$taskRoot = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..'))
Push-Location $taskRoot
try {
git rev-parse --is-inside-work-tree | Out-Null
if ($LASTEXITCODE -ne 0) { throw 'Not a Git working tree.' }
$taskIgnored = @(
'Server/XFEWarframe.Server/bin/Debug/server.dll', 'Client/XFEWarframe.Player/obj/project.assets.json',
'.vs/workspace.suo', 'artifacts/package/Client/XFEWarframe.Player.exe',
'Server/runtime/server.json', 'runtime/state.json', 'Server/runtime/inventory-backups/save.json',
'test/ProfilesRoot/Profiles/SystemProfile.json', 'test/Credentials/login.dat',
'.env', '.env.local', 'local.pfx', 'local.key', 'server.log', 'TestResults/result.trx',
'scripts/__pycache__/audit.pyc'
)
foreach ($taskPath in $taskIgnored) {
git check-ignore -q --no-index -- $taskPath
if ($LASTEXITCODE -ne 0) { throw "Generated or private path is not ignored: $taskPath" }
}
$taskSources = @(
'Client/XFEWarframe.Client/Runtime/RuntimeControlServer.cs',
'Client/XFEWarframe.Player/Profiles/CrossVersionProfiles/SystemProfile.cs',
'Client/SharedUI/Localization/translations.json', 'Server/data/inventory-defaults.json',
'Client/XFEWarframe.Player/Properties/launchSettings.json', '.env.example'
)
foreach ($taskPath in $taskSources) {
git check-ignore -q --no-index -- $taskPath
if ($LASTEXITCODE -eq 0) { throw "Required source is ignored: $taskPath" }
}
$taskTrackedPrivate = @(git ls-files --cached --ignored --exclude-standard)
if ($taskTrackedPrivate.Count) { throw ('Ignored paths are already tracked: ' + ($taskTrackedPrivate -join ', ')) }
git -c core.safecrlf=false diff --check
if ($LASTEXITCODE -ne 0) { throw 'Whitespace errors in the working diff.' }
git -c core.safecrlf=false diff --cached --check
if ($LASTEXITCODE -ne 0) { throw 'Whitespace errors in the staged diff.' }
Write-Output "PASS Git: $($taskIgnored.Count) private/generated paths ignored; $($taskSources.Count) source paths retained; no ignored files tracked; diff checks passed."
} finally { Pop-Location }