commit-and-push.ps1 (443L / 21KB) was a one-shot deployment script
that staged 25 themed commits to land the May 2026 polish batch in
a single run. That work has long since been committed; every
Stage-AndCommit call is now a no-op because nothing matches what's
already in history, and one of the file paths it referenced
(DiskSpaceWatcher.cs) was deleted alongside the recording surface.
Replaced it with a 45-line wrapper that does what the day-to-day
workflow actually needs: run build-and-test.ps1, refuse to push if
either failed, then push the current branch to origin. README and
NEXT_STEPS still reference the script name; behavior is now what
those docs imply ("build + tests + push") rather than the original
"land 25 specific commits."
Also deleted src/tests/TeamsISO.Engine.Tests/SmokeTest.cs — a
single Assert.True(true) placeholder kept "to confirm the project
is wired." 103 real engine tests confirm the project is wired far
more meaningfully than a tautology. Net test count drops 104 → 103
on the Engine side; 56 + 103 = 159 still pass.
Build clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
45 lines
2 KiB
PowerShell
45 lines
2 KiB
PowerShell
# Build + test verification, then push the current branch to origin.
|
|
#
|
|
# Run from the repo root:
|
|
# pwsh -ExecutionPolicy Bypass -File .\commit-and-push.ps1
|
|
#
|
|
# This is the operator's "I'm done with this branch, ship it" helper. It
|
|
# runs build-and-test.ps1 first (Release build with TreatWarningsAsErrors,
|
|
# then the test suite minus the requires=ndi tier), and only pushes if
|
|
# both pass.
|
|
#
|
|
# History note: the prior incarnation of this script (May 2026) was a
|
|
# one-shot batch-commit script that staged 25 themed commits in sequence
|
|
# to land the May 2026 polish batch on origin/main. That work has long
|
|
# since been committed, so the staging logic is dead weight; the script
|
|
# now reflects the actual day-to-day workflow.
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
if (-not (Test-Path '.git') -or -not (Test-Path 'TeamsISO.sln')) {
|
|
throw "Run from the TeamsISO repo root."
|
|
}
|
|
|
|
# Step 1 — build + tests must be green before anything ships.
|
|
Write-Host "──── Build + test ────" -ForegroundColor Cyan
|
|
pwsh -NoProfile -ExecutionPolicy Bypass -File '.\build-and-test.ps1'
|
|
if ($LASTEXITCODE -ne 0) { throw "build-and-test.ps1 failed; aborting." }
|
|
|
|
# Step 2 — what are we pushing? Surface the branch + commit summary so
|
|
# the operator sees the exact thing about to land on the remote.
|
|
$branch = (git rev-parse --abbrev-ref HEAD).Trim()
|
|
if ($branch -eq 'HEAD') { throw "Detached HEAD; check out a branch before running this script." }
|
|
|
|
Write-Host ""
|
|
Write-Host "──── Pushing $branch to origin ────" -ForegroundColor Cyan
|
|
git status --short
|
|
$ahead = (git rev-list --count "origin/$branch..HEAD" 2>$null)
|
|
if (-not $ahead) { $ahead = (git rev-list --count HEAD).Trim() }
|
|
Write-Host " $ahead commit(s) to push." -ForegroundColor DarkGray
|
|
|
|
git push origin $branch
|
|
if ($LASTEXITCODE -ne 0) { throw "git push failed." }
|
|
|
|
Write-Host ""
|
|
Write-Host "Done. Pushed $branch to origin." -ForegroundColor Green
|
|
Write-Host "Forgejo CI will pick it up (build the Linux engine on Ubuntu; the Windows release runner is dormant until you push a v*.*.* tag)." -ForegroundColor DarkGray
|