|
| 1 | +# GitDock v1.2.0 - publish branch, PR, and release helper |
| 2 | +# Run from repo root: pwsh -File scripts/publish-v1.2.0.ps1 |
| 3 | +# Optional: pwsh -File scripts/publish-v1.2.0.ps1 -Push -CreatePr |
| 4 | + |
| 5 | +param( |
| 6 | + [switch]$Push, |
| 7 | + [switch]$CreatePr |
| 8 | +) |
| 9 | + |
| 10 | +$ErrorActionPreference = "Stop" |
| 11 | +Set-Location (Split-Path $PSScriptRoot -Parent) |
| 12 | + |
| 13 | +function Require-GitIdentity { |
| 14 | + $name = git config user.name 2>$null |
| 15 | + $email = git config user.email 2>$null |
| 16 | + if (-not $name -or -not $email) { |
| 17 | + Write-Host "Git user.name / user.email are not set for this repo or globally." -ForegroundColor Red |
| 18 | + Write-Host "Run once (use your GitHub noreply email if you prefer):" -ForegroundColor Yellow |
| 19 | + Write-Host ' git config --global user.name "Your Name"' |
| 20 | + Write-Host ' git config --global user.email "you@users.noreply.github.com"' |
| 21 | + exit 1 |
| 22 | + } |
| 23 | +} |
| 24 | + |
| 25 | +function Ensure-Branch { |
| 26 | + $branch = git branch --show-current |
| 27 | + if ($branch -ne "feat/v1.2.0-setup-and-dashboard-ux") { |
| 28 | + git checkout -b feat/v1.2.0-setup-and-dashboard-ux 2>$null |
| 29 | + if ($LASTEXITCODE -ne 0) { |
| 30 | + git checkout feat/v1.2.0-setup-and-dashboard-ux |
| 31 | + } |
| 32 | + } |
| 33 | +} |
| 34 | + |
| 35 | +Require-GitIdentity |
| 36 | +Ensure-Branch |
| 37 | + |
| 38 | +# Reset staging so commits are predictable |
| 39 | +git reset HEAD 2>$null | Out-Null |
| 40 | + |
| 41 | +git add server.js dashboard.html |
| 42 | +git commit -m @" |
| 43 | +feat(app): align account setup with GitHub SSH and token docs |
| 44 | +
|
| 45 | +- Use published GitHub SSH host key fingerprints in known_hosts |
| 46 | +- SSH verify feedback, fine-grained PAT checks, optional Remember in OS credential store |
| 47 | +- Dashboard: dormant repos, cloned border, action control bar, modal backdrop and Escape |
| 48 | +- Remove sidebar Activity log |
| 49 | +"@ |
| 50 | + |
| 51 | +git add README.md site/privacy.html |
| 52 | +git commit -m @" |
| 53 | +docs: update README and privacy for tokens and dormant repos |
| 54 | +
|
| 55 | +- Document PAT session and OS credential store behavior |
| 56 | +- Clarify dormant repo detection vs Hub stale machines |
| 57 | +- Refresh interface and tech stack sections |
| 58 | +"@ |
| 59 | + |
| 60 | +git add site/index.html site/download.html |
| 61 | +git commit -m @" |
| 62 | +docs(site): align marketing copy and security wording |
| 63 | +
|
| 64 | +- Replace em dash punctuation in user-facing copy |
| 65 | +- Align token and dormant messaging with the app |
| 66 | +"@ |
| 67 | + |
| 68 | +git add package.json .gitignore scripts/publish-v1.2.0.ps1 scripts/release-v1.2.0-pr-body.md scripts/release-v1.2.0-notes.md |
| 69 | +git commit -m @" |
| 70 | +chore: release v1.2.0 and publish helper scripts |
| 71 | +
|
| 72 | +- Bump package version to 1.2.0 |
| 73 | +- Ignore persona/ local clone workspace if created inside the repo |
| 74 | +- Add scripts to open PR and paste GitHub Release notes |
| 75 | +"@ |
| 76 | + |
| 77 | +Write-Host "`nCommits on branch feat/v1.2.0-setup-and-dashboard-ux:" -ForegroundColor Green |
| 78 | +git log --oneline -4 |
| 79 | + |
| 80 | +if ($Push) { |
| 81 | + git push -u origin feat/v1.2.0-setup-and-dashboard-ux |
| 82 | + Write-Host "`nBranch pushed." -ForegroundColor Green |
| 83 | +} |
| 84 | + |
| 85 | +if ($CreatePr) { |
| 86 | + if (-not (Get-Command gh -ErrorAction SilentlyContinue)) { |
| 87 | + Write-Host "GitHub CLI (gh) not found. Install gh and run: gh auth login" -ForegroundColor Red |
| 88 | + exit 1 |
| 89 | + } |
| 90 | + $bodyFile = Join-Path $PSScriptRoot "release-v1.2.0-pr-body.md" |
| 91 | + gh pr create --base main --head feat/v1.2.0-setup-and-dashboard-ux ` |
| 92 | + --title "Release prep: v1.2.0 setup, dashboard UX, and docs" ` |
| 93 | + --body-file $bodyFile |
| 94 | + Write-Host "`nPR created. Review and merge on GitHub." -ForegroundColor Green |
| 95 | +} |
| 96 | + |
| 97 | +if (-not $Push) { |
| 98 | + Write-Host "`nNext (after reviewing commits):" -ForegroundColor Cyan |
| 99 | + Write-Host " pwsh -File scripts/publish-v1.2.0.ps1 -Push -CreatePr" |
| 100 | + Write-Host "`nAfter merge, create GitHub Release tag v1.2.0 (see scripts/release-v1.2.0-notes.md)." -ForegroundColor Cyan |
| 101 | +} |
0 commit comments