@@ -11,10 +11,12 @@ class GitInstallDetails
11
11
public string GitLfsExec { get ; }
12
12
public NPath GitLfsExecPath { get ; }
13
13
14
+ public const string GitExtractedMD5 = "e6cfc0c294a2312042f27f893dfc9c0a" ;
15
+ public const string GitLfsExtractedMD5 = "ae968b69fbf42dff72311040d24a" ;
16
+
14
17
public const string WindowsGitLfsExecutableMD5 = "177bb14d0c08f665a24f0d5516c3b080" ;
15
18
public const string MacGitLfsExecutableMD5 = "f81a1a065a26a4123193e8fd96c561ad" ;
16
19
17
- public const string ExtractedMD5 = "65fd0575d3b47d8207b9e19d02faca4f" ;
18
20
public const string FileListMD5 = "a152a216b2e76f6c127053251187a278" ;
19
21
20
22
private const string PackageVersion = "f02737a78695063deace08e96d5042710d3e32db" ;
@@ -108,22 +110,14 @@ public void SetupGitIfNeeded(ActionTask<NPath> onSuccess, ITask onFailure)
108
110
109
111
var gitExtractPath = tempZipPath . Combine ( "git" ) . CreateDirectory ( ) ;
110
112
var gitLfsExtractPath = tempZipPath . Combine ( "git-lfs" ) . CreateDirectory ( ) ;
111
-
112
- new UnzipTask ( cancellationToken , gitArchivePath , gitExtractPath , sharpZipLibHelper )
113
- . Then ( new UnzipTask ( cancellationToken , gitLfsArchivePath , gitLfsExtractPath , sharpZipLibHelper ) )
113
+
114
+ new UnzipTask ( cancellationToken , gitArchivePath , gitExtractPath , sharpZipLibHelper , environment . FileSystem , GitInstallDetails . GitExtractedMD5 )
115
+ . Then ( new UnzipTask ( cancellationToken , gitLfsArchivePath , gitLfsExtractPath , sharpZipLibHelper , environment . FileSystem , GitInstallDetails . GitLfsExtractedMD5 ) )
114
116
. Then ( ( ) => {
115
117
var targetGitLfsExecPath = installDetails . GetGitLfsExecPath ( gitExtractPath ) ;
116
118
var extractGitLfsExePath = gitLfsExtractPath . Combine ( installDetails . GitLfsExec ) ;
117
119
extractGitLfsExePath . Move ( targetGitLfsExecPath ) ;
118
120
119
- var extractedMD5 = environment . FileSystem . CalculateFolderMD5 ( gitExtractPath ) ;
120
- if ( ! extractedMD5 . Equals ( GitInstallDetails . ExtractedMD5 , StringComparison . InvariantCultureIgnoreCase ) )
121
- {
122
- Logger . Warning ( "MD5 {0} does not match expected {1}" , extractedMD5 , GitInstallDetails . ExtractedMD5 ) ;
123
- Logger . Warning ( "Failed PortableGitInstallTask" ) ;
124
- throw new Exception ( ) ;
125
- }
126
-
127
121
Logger . Trace ( "Moving tempDirectory:\" {0}\" to extractTarget:\" {1}\" " , gitExtractPath ,
128
122
installDetails . GitInstallPath ) ;
129
123
0 commit comments