@@ -152,8 +152,14 @@ private bool SyncToPublicRepository()
152152 var uploadedArtifacts = new HashSet < ArtifactFileInfo > ( ) ;
153153 var uploadedArtifactHashes = new HashSet < string > ( StringComparer . OrdinalIgnoreCase ) ;
154154
155- // Upload build artifacts from original repository
156- if ( ! TryUploadBuildArtifacts ( repositoryRoot , remoteBase , dryRun , ref uploadedArtifacts , uploadedArtifactHashes ) )
155+ // Upload windows binaries
156+ if ( ! TryUploadBuildArtifacts ( repositoryRoot , remoteBase , "win64" , dryRun , ref uploadedArtifacts , uploadedArtifactHashes ) )
157+ {
158+ return false ;
159+ }
160+
161+ // Upload linux binaries
162+ if ( ! TryUploadBuildArtifacts ( repositoryRoot , remoteBase , "linuxsteamrt64" , dryRun , ref uploadedArtifacts , uploadedArtifactHashes ) )
157163 {
158164 return false ;
159165 }
@@ -263,9 +269,9 @@ private static bool CleanIgnoredFiles( string relativeRepoPath )
263269 return false ;
264270 }
265271
266- private static bool TryUploadBuildArtifacts ( string repositoryRoot , string remoteBase , bool skipUpload , ref HashSet < ArtifactFileInfo > artifacts , HashSet < string > uploadedHashes )
272+ private static bool TryUploadBuildArtifacts ( string repositoryRoot , string remoteBase , string platform , bool skipUpload , ref HashSet < ArtifactFileInfo > artifacts , HashSet < string > uploadedHashes )
267273 {
268- var buildArtifactsRoot = Path . Combine ( repositoryRoot , "game" , "bin" , "win64" ) ;
274+ var buildArtifactsRoot = Path . Combine ( repositoryRoot , "game" , "bin" , platform ) ;
269275 if ( ! Directory . Exists ( buildArtifactsRoot ) )
270276 {
271277 Log . Info ( $ "Build artifacts directory not found, skipping upload: { buildArtifactsRoot } " ) ;
@@ -436,7 +442,7 @@ private string PushToPublicRepository( string relativeRepoPath )
436442 }
437443 }
438444
439- if ( ! Utility . RunProcess ( "git" , $ "push public { PUBLIC_BRANCH } --force ", relativeRepoPath ) )
445+ if ( ! Utility . RunProcess ( "git" , $ "push public { PUBLIC_BRANCH } ", relativeRepoPath ) )
440446 {
441447 Log . Error ( "Failed to push to public repository" ) ;
442448 return null ;
@@ -486,32 +492,19 @@ private static HashSet<string> GetCurrentLfsFiles( string relativeRepoPath )
486492
487493 private static HashSet < string > GetAllPublicLfsFiles ( string relativeRepoPath )
488494 {
489- // Get base set
490495 var trackedFiles = GetCurrentLfsFiles ( relativeRepoPath ) ;
491496
492- // Extend with all lfs files from first commit to HEAD
493- var firstCommitHash = string . Empty ;
494- if ( ! Utility . RunProcess ( "git" , "rev-list --max-parents=0 HEAD" , relativeRepoPath , onDataReceived : ( _ , e ) =>
497+ if ( ! Utility . RunProcess ( "git" , "lfs ls-files --all --deleted --name-only" , relativeRepoPath , onDataReceived : ( _ , e ) =>
495498 {
496- if ( ! string . IsNullOrWhiteSpace ( e . Data ) )
499+ if ( string . IsNullOrWhiteSpace ( e . Data ) )
497500 {
498- firstCommitHash = e . Data . Trim ( ) ;
501+ return ;
499502 }
500- } ) )
501- {
502- Log . Error ( "Failed find first commit" ) ;
503- return null ;
504- }
505503
506- if ( ! Utility . RunProcess ( "git" , $ "lfs ls-files --name-only { firstCommitHash } HEAD", relativeRepoPath , onDataReceived : ( _ , e ) =>
507- {
508- if ( ! string . IsNullOrWhiteSpace ( e . Data ) )
509- {
510- trackedFiles . Add ( ToForwardSlash ( e . Data . Trim ( ) ) ) ;
511- }
504+ trackedFiles . Add ( ToForwardSlash ( e . Data . Trim ( ) ) ) ;
512505 } ) )
513506 {
514- Log . Error ( "Failed to list LFS tracked files" ) ;
507+ Log . Error ( "Failed to list historical LFS tracked files" ) ;
515508 return null ;
516509 }
517510
0 commit comments