SmartCane/push_to_bitbucket.ps1
Timon d5fd4bb463 Add KPI reporting system and deployment documentation
Major Changes:
- NEW: Scripts 09 & 10 for KPI calculation and enhanced reporting
- NEW: Shell script wrappers (01-10) for easier execution
- NEW: R packages flextable and officer for enhanced Word reports
- NEW: DEPLOYMENT_README.md with complete deployment guide
- RENAMED: Numbered R scripts (02, 03, 04) for clarity
- REMOVED: Old package management scripts (using renv only)
- UPDATED: Workflow now uses scripts 09->10 instead of 05

Files Changed: 90+ files
New Packages: flextable, officer
New Scripts: 09_run_calculate_kpis.sh, 10_run_kpi_report.sh
Documentation: DEPLOYMENT_README.md, EMAIL_TO_ADMIN.txt

See DEPLOYMENT_README.md for full deployment instructions.
2025-10-14 11:49:30 +02:00

73 lines
2.6 KiB
PowerShell

# SmartCane - Git Push to Bitbucket
# Run this script to commit and push all changes
# Step 1: Check current status
Write-Host "=== Current Git Status ===" -ForegroundColor Cyan
git status
# Step 2: Add all new and modified files
Write-Host "`n=== Adding Files ===" -ForegroundColor Cyan
git add -A
# Step 3: Show what will be committed
Write-Host "`n=== Files to be committed ===" -ForegroundColor Cyan
git status
# Step 4: Commit with descriptive message
Write-Host "`n=== Committing Changes ===" -ForegroundColor Cyan
$commitMessage = @"
Add KPI reporting system and deployment documentation
Major Changes:
- NEW: Scripts 09 & 10 for KPI calculation and enhanced reporting
- NEW: Shell script wrappers (01-10) for easier execution
- NEW: R packages flextable and officer for enhanced Word reports
- NEW: DEPLOYMENT_README.md with complete deployment guide
- RENAMED: Numbered R scripts (02, 03, 04) for clarity
- REMOVED: Old package management scripts (using renv only)
- UPDATED: Workflow now uses scripts 09->10 instead of 05
Files Changed: 90+ files
New Packages: flextable, officer
New Scripts: 09_run_calculate_kpis.sh, 10_run_kpi_report.sh
Documentation: DEPLOYMENT_README.md, EMAIL_TO_ADMIN.txt
See DEPLOYMENT_README.md for full deployment instructions.
"@
git commit -m $commitMessage
# Step 5: Push to Bitbucket
Write-Host "`n=== Ready to Push ===" -ForegroundColor Yellow
Write-Host "Current branch: " -NoNewline
git branch --show-current
Write-Host "`nDo you want to push to Bitbucket? (Y/N): " -ForegroundColor Yellow -NoNewline
$confirmation = Read-Host
if ($confirmation -eq 'Y' -or $confirmation -eq 'y') {
Write-Host "`n=== Pushing to Bitbucket ===" -ForegroundColor Green
# Get current branch name
$branch = git branch --show-current
# Push to origin
git push origin $branch
Write-Host "`n[SUCCESS] Pushed to Bitbucket!" -ForegroundColor Green
Write-Host "`nNext steps:" -ForegroundColor Cyan
Write-Host "1. Send EMAIL_TO_ADMIN.txt to your administrator"
Write-Host "2. Ensure they have access to the Bitbucket repository"
Write-Host "3. Monitor deployment and test on Linux server"
Write-Host "4. Update Laravel UI with Script 10 parameters"
} else {
Write-Host "`n[CANCELLED] Push cancelled. Run 'git push origin $(git branch --show-current)' when ready." -ForegroundColor Yellow
}
Write-Host "`n=== Summary ===" -ForegroundColor Cyan
Write-Host "Deployment guide: DEPLOYMENT_README.md"
Write-Host "Admin email: EMAIL_TO_ADMIN.txt"
Write-Host "New scripts: 09_run_calculate_kpis.sh, 10_run_kpi_report.sh"
Write-Host "New packages: flextable, officer"