Patch BuildGraph to delete shared artifacts if they exist before writing
To prevent these kinds of errors from failing the build:
System.IO.IOException: Could not create file "/Volumes/BuildArtifacts/ikbs5jtg/Compile UE4Game Mac Development/Manifest-GameBinaries_UE4Game_Mac_Development.zip". File already exists.
at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <e068e2227ab74c1bb3d724ebaab0e3ff>:0
at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) [0x00000] in <e068e2227ab74c1bb3d724ebaab0e3ff>:0
at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions)
at System.IO.FileSystem.CopyFile (System.String sourceFullPath, System.String destFullPath, System.Boolean overwrite) [0x00035] in <e068e2227ab74c1bb3d724ebaab0e3ff>:0
at System.IO.FileInfo.CopyTo (System.String destFileName, System.Boolean overwrite) [0x00032] in <e068e2227ab74c1bb3d724ebaab0e3ff>:0
at System.IO.FileInfo.CopyTo (System.String destFileName) [0x00000] in <e068e2227ab74c1bb3d724ebaab0e3ff>:0
at (wrapper remoting-invoke-with-check) System.IO.FileInfo.CopyTo(string)
at AutomationTool.TempStorage+<>c__DisplayClass14_1.<ParallelZipFiles>b__11 () [0x000f4] in <97268c7989214f4c8cd31dbc8a9c1f81>:0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00014] in <e068e2227ab74c1bb3d724ebaab0e3ff>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <e068e2227ab74c1bb3d724ebaab0e3ff>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <e068e2227ab74c1bb3d724ebaab0e3ff>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <e068e2227ab74c1bb3d724ebaab0e3ff>:0
at System.Threading.ThreadHelper.ThreadStart () [0x00008] in <e068e2227ab74c1bb3d724ebaab0e3ff>:0
This reliably happens if you try to restart a build on GitLab, so we should just make BuildGraph delete shared artifacts if they exist before writing them.