Monorepo for Aesthetic.Computer aesthetic.computer
at main 71 lines 2.4 kB view raw
1# Sync SpiderLily Project from Perforce 2# Uses the existing spiderlily_build_workspace 3 4$ErrorActionPreference = "Stop" 5 6Write-Host "=========================================" -ForegroundColor Cyan 7Write-Host "Syncing SpiderLily from Perforce" -ForegroundColor Cyan 8Write-Host "=========================================" -ForegroundColor Cyan 9Write-Host "" 10 11# Set Perforce environment 12$env:P4PORT = "ssl:falsework.helixcore.io:1666" 13$env:P4USER = "machine" 14$env:P4CLIENT = "spiderlily_build_workspace" 15 16Write-Host "Server: $env:P4PORT" -ForegroundColor Cyan 17Write-Host "User: $env:P4USER" -ForegroundColor Cyan 18Write-Host "Workspace: $env:P4CLIENT" -ForegroundColor Cyan 19Write-Host "" 20 21# Check workspace info 22Write-Host "Workspace details:" -ForegroundColor Yellow 23p4 client -o $env:P4CLIENT | Select-String "Root:|View:" 24Write-Host "" 25 26# Ask for confirmation 27$response = Read-Host "Sync latest revision? This may take a while (y/N)" 28if ($response -ne "y" -and $response -ne "Y") { 29 Write-Host "Cancelled." -ForegroundColor Yellow 30 exit 0 31} 32 33Write-Host "" 34Write-Host "Syncing files..." -ForegroundColor Yellow 35Write-Host "This may take several minutes depending on project size..." -ForegroundColor Gray 36Write-Host "" 37 38# Sync the workspace 39p4 sync 40 41if ($LASTEXITCODE -ne 0) { 42 Write-Host "" 43 Write-Host "[ERROR] Sync failed!" -ForegroundColor Red 44 Write-Host "Try running: p4 sync -f" -ForegroundColor Yellow 45 exit 1 46} 47 48Write-Host "" 49Write-Host "[OK] Sync complete!" -ForegroundColor Green 50Write-Host "" 51 52# Find the project file 53Write-Host "Locating SpiderLily.uproject..." -ForegroundColor Yellow 54$projectFiles = Get-ChildItem -Path "C:\Perforce" -Filter "SpiderLily.uproject" -Recurse -ErrorAction SilentlyContinue 55 56if ($projectFiles.Count -eq 0) { 57 Write-Host "[WARNING] SpiderLily.uproject not found in C:\Perforce" -ForegroundColor Yellow 58 Write-Host "Check the workspace mapping or project structure." -ForegroundColor Yellow 59} else { 60 $projectPath = $projectFiles[0].FullName 61 $projectDir = $projectFiles[0].DirectoryName 62 63 Write-Host "[OK] Found project at: $projectPath" -ForegroundColor Green 64 Write-Host "" 65 Write-Host "Update build-false-work.ps1 with:" -ForegroundColor Cyan 66 Write-Host " `$ProjectRoot = `"$projectDir`"" -ForegroundColor White 67} 68 69Write-Host "" 70Write-Host "Next step: Run build-false-work.ps1 to build the project" -ForegroundColor Yellow 71Write-Host ""