Skip to content

Commit 5e8fe9b

Browse files
committed
chore: Update release workflow to commit Scoop manifest changes and add new script for committing
1 parent 7fc34a8 commit 5e8fe9b

File tree

2 files changed

+41
-3
lines changed

2 files changed

+41
-3
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ jobs:
3939
run: ./scripts/check-goreleaser-output.ps1
4040
shell: pwsh
4141

42-
- name: Fix Scoop Manifest (Test - Log Only)
42+
- name: Fix Scoop Manifest
4343
run: ./scripts/fix-scoop-manifest.ps1
4444
shell: pwsh
4545

46-
- name: Show what would be committed
47-
run: ./scripts/show-commit-summary.ps1
46+
- name: Commit scoop manifest changes
47+
run: ./scripts/commit-scoop-manifest.ps1
4848
shell: pwsh

scripts/commit-scoop-manifest.ps1

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Write-Host "🚀 Committing scoop manifest changes..."
2+
3+
if (Test-Path 'zed-cli-win-unofficial.json') {
4+
Write-Host "✅ Found fixed manifest: zed-cli-win-unofficial.json"
5+
Write-Host " Size: $((Get-Item 'zed-cli-win-unofficial.json').Length) bytes"
6+
7+
# Configure git user (required for commits)
8+
git config user.name "SameerJS6"
9+
git config user.email "[email protected]"
10+
11+
# Add the fixed manifest file
12+
git add zed-cli-win-unofficial.json
13+
Write-Host "📝 Added file to git staging"
14+
15+
# Check if there are changes to commit
16+
$gitStatus = git status --porcelain
17+
if ($gitStatus) {
18+
# Commit with descriptive message
19+
$commitMessage = "Scoop update for zed-cli-win-unofficial version ${env:GITHUB_REF_NAME} with zed.bat"
20+
git commit -m $commitMessage
21+
Write-Host "✅ Committed changes with message: '$commitMessage'"
22+
23+
# Push to main branch
24+
git push origin main
25+
Write-Host "🚀 Pushed changes to main branch"
26+
27+
Write-Host ""
28+
Write-Host "🎉 Successfully updated scoop manifest!"
29+
}
30+
else {
31+
Write-Host "ℹ️ No changes to commit (manifest may already be up to date)"
32+
}
33+
34+
}
35+
else {
36+
Write-Host "❌ No manifest file found to commit"
37+
exit 1
38+
}

0 commit comments

Comments
 (0)