@@ -99,13 +99,36 @@ public void SetupGitIfNeeded(ActionTask<NPath> onSuccess, ITask onFailure)
99
99
else
100
100
{
101
101
var tempZipPath = NPath . CreateTempDirectory ( "git_zip_paths" ) ;
102
- var gitArchivePath = AssemblyResources . ToFile ( ResourceType . Platform , "git.zip" , tempZipPath , environment ) ;
103
- var gitLfsArchivePath = AssemblyResources . ToFile ( ResourceType . Platform , "git-lfs.zip" , tempZipPath , environment ) ;
104
-
102
+ var gitArchivePath = tempZipPath . Combine ( "git.zip" ) ;
103
+ var gitLfsArchivePath = tempZipPath . Combine ( "git-lfs.zip" ) ;
105
104
var gitExtractPath = tempZipPath . Combine ( "git" ) . CreateDirectory ( ) ;
106
105
var gitLfsExtractPath = tempZipPath . Combine ( "git-lfs" ) . CreateDirectory ( ) ;
107
106
108
- new UnzipTask ( cancellationToken , gitArchivePath , gitExtractPath , sharpZipLibHelper )
107
+ var downloadGitMd5Task = new DownloadTextTask ( CancellationToken . None ,
108
+ "https://ghfvs-installer.github.com/unity/portable_git/git.zip.MD5.txt?cb=1" ) ;
109
+
110
+ var downloadGitTask = new DownloadTask ( CancellationToken . None , environment . FileSystem ,
111
+ "https://ghfvs-installer.github.com/unity/portable_git/git.zip" , gitArchivePath , retryCount : 1 ) ;
112
+
113
+ var downloadGitLfsMd5Task = new DownloadTextTask ( CancellationToken . None ,
114
+ "https://ghfvs-installer.github.com/unity/portable_git/git-lfs.zip.MD5.txt?cb=1" ) ;
115
+
116
+ var downloadGitLfsTask = new DownloadTask ( CancellationToken . None , environment . FileSystem ,
117
+ "https://ghfvs-installer.github.com/unity/portable_git/git-lfs.zip" , gitLfsArchivePath , retryCount : 1 ) ;
118
+
119
+ downloadGitMd5Task
120
+ . Then ( ( b , s ) =>
121
+ {
122
+ downloadGitTask . ValidationHash = s ;
123
+ } )
124
+ . Then ( downloadGitTask )
125
+ . Then ( downloadGitLfsMd5Task )
126
+ . Then ( ( b , s ) =>
127
+ {
128
+ downloadGitLfsTask . ValidationHash = s ;
129
+ } )
130
+ . Then ( downloadGitLfsTask )
131
+ . Then ( new UnzipTask ( cancellationToken , gitArchivePath , gitExtractPath , sharpZipLibHelper ) )
109
132
. Then ( new UnzipTask ( cancellationToken , gitLfsArchivePath , gitLfsExtractPath , sharpZipLibHelper ) )
110
133
. Then ( ( ) => {
111
134
var targetGitLfsExecPath = installDetails . GetGitLfsExecPath ( gitExtractPath ) ;
0 commit comments