251206:1605 docs: update README and patch 2git.ps1
Some checks failed
Spec Validation / validate-markdown (push) Has been cancelled
Spec Validation / validate-diagrams (push) Has been cancelled
Spec Validation / check-todos (push) Has been cancelled

This commit is contained in:
admin
2025-12-06 16:05:28 +07:00
parent fea8ed6b80
commit be3b71007a

View File

@@ -1,14 +1,38 @@
param([string]$Message = "Backup")
$Timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
$CommitMsg = "Backup: $Message | $Timestamp"
$Timestamp = Get-Date -Format "yyMMdd:HHmm"
$CommitMsg = "$Timestamp $Message"
Write-Host "Backup: $CommitMsg" -ForegroundColor Cyan
Write-Host "📦 $CommitMsg" -ForegroundColor Cyan
git add .
git commit -m $CommitMsg
git push origin main
git push github main
Write-Host "Done!" -ForegroundColor Green
# Check if anything to commit
$status = git status --porcelain
if (-not $status) {
Write-Host "⚠️ Nothing to commit" -ForegroundColor Yellow
pause
exit
}
git commit -m $CommitMsg
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ Commit failed" -ForegroundColor Red
pause
exit 1
}
Write-Host "🚀 Pushing to Gitea..." -ForegroundColor Cyan
git push origin main
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ Push to Gitea failed" -ForegroundColor Red
}
Write-Host "🚀 Pushing to GitHub..." -ForegroundColor Cyan
git push github main
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ Push to GitHub failed" -ForegroundColor Red
}
Write-Host "✅ Done!" -ForegroundColor Green
pause