Skip to content

Commit

Permalink
fixing the logic to fetch the sha value from the correct file (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
soninaren authored Jun 25, 2024
1 parent cdc46a8 commit f8e7d22
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions GenerateToolingFeed/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static void UpdateCoreToolsReferences(V4FormatCliEntry[] cliEntries, stri
{
bool minified = ShouldBeMinified(cliEntry);

cliEntry.sha2 = GetShaFileContent(cliEntry.OS, cliEntry.Architecture, cliVersion, coreToolsArtifactsDirectory, minified);
cliEntry.sha2 = GetShaFileContent(cliEntry.OS, cliEntry.Architecture, cliVersion, coreToolsArtifactsDirectory, minified, linkSuffix);
cliEntry.downloadLink = GetDownloadLink(cliEntry.OS, cliEntry.Architecture, cliVersion, minified, linkSuffix);
}
}
Expand Down Expand Up @@ -81,10 +81,10 @@ public static string GetNewReleaseVersion(JToken jToken, int majorReleaseVersion
return newReleaseVersion;
}

public static string GetShaFileContent(string os, string architecture, string cliVersion, string filePath, bool isMinified = false)
public static string GetShaFileContent(string os, string architecture, string cliVersion, string filePath, bool isMinified = false, string linkSuffix = "")
{
string rid = GetRuntimeIdentifier(isMinified, os, architecture);
string fileName = $"Azure.Functions.Cli.{rid}.{cliVersion}.zip.sha2";
string fileName = $"Azure.Functions.Cli.{rid}{linkSuffix}.{cliVersion}.zip.sha2";

string path = Path.Combine(filePath, fileName);
return File.ReadAllText(path);
Expand Down

0 comments on commit f8e7d22

Please sign in to comment.