Terminate the 'StartsWith' string in the badge existence check. (#9049)

* Terminate the 'StartsWith' string in the badge existence check.

* Replace "string.Concat"
This commit is contained in:
John Beisner 2018-04-11 12:09:16 -07:00 committed by GitHub
parent 33561577c4
commit 07a15f9420
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View file

@ -5,7 +5,8 @@
DependsOnTargets="CheckIfAllBuildsHavePublished;
FinalizeBuild" />
<Target Name="CheckIfAllBuildsHavePublished">
<Target Name="CheckIfAllBuildsHavePublished"
DependsOnTargets="SetBadgeProps">
<CheckIfAllBuildsHavePublished AccountKey="$(ArtifactCloudDropAccessToken)"
AccountName="$(ArtifactCloudDropAccountName)"
ContainerName="$(ArtifactContainerName)"

View file

@ -55,9 +55,9 @@ namespace Microsoft.DotNet.Cli.Build
{ "linux_x64", false },
{ "rhel.6_x64", false },
{ "alpine.3.6_x64", false },
{ "all_linux_distros_native_installer", false},
{ "linux_arm", false},
{ "linux_arm64", false}
{ "all_linux_distros_native_installer", false },
{ "linux_arm", false },
{ "linux_arm64", false }
};
if (!badges.ContainsKey(VersionBadgeMoniker))
@ -71,7 +71,7 @@ namespace Microsoft.DotNet.Cli.Build
string name = Path.GetFileName(file);
foreach (string img in badges.Keys)
{
if ((name.StartsWith($"{img}")) && (name.EndsWith(".svg")))
if ((name.StartsWith($"{img}_")) && (name.EndsWith(".svg")))
{
badges[img] = true;
break;