Skip to content

Commit 58479b6

Browse files
authored
Merge pull request #105 from BryanSoltis/main
2024-06-21 - BryanSoltis - v4.2.1 Updates
2 parents 86d8a69 + b8cfcd5 commit 58479b6

4 files changed

+11
-11
lines changed

src/AzureNamingTool.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFramework>net8.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
7-
<Version>4.2.0</Version>
7+
<Version>4.2.1</Version>
88
<GenerateDocumentationFile>true</GenerateDocumentationFile>
99
<UserSecretsId>eca63fb9-b7f9-454f-910b-5088ae877085</UserSecretsId>
1010
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>

src/Helpers/ConfigurationHelper.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -478,13 +478,13 @@ public static async Task<string> GetCurrentConfigFileVersionData()
478478
string versiondatajson = String.Empty;
479479
try
480480
{
481-
versiondatajson = await FileSystemHelper.ReadFile("configurationfileversions.json");
481+
versiondatajson = await FileSystemHelper.ReadFile("configurationfileversions.json", "");
482482
// Check if the user has any version data. This value will be '[]' if not.
483483
if (versiondatajson == "[]")
484484
{
485485
// Create new version data with default values in /settings file
486486
ConfigurationFileVersionData? versiondata = new();
487-
await FileSystemHelper.WriteFile("configurationfileversions.json", JsonSerializer.Serialize(versiondata), "settings/");
487+
await FileSystemHelper.WriteFile("configurationfileversions.json", JsonSerializer.Serialize(versiondata), "");
488488
versiondatajson = JsonSerializer.Serialize(versiondata);
489489
}
490490
}
@@ -522,13 +522,13 @@ public static async Task<List<string>> VerifyConfigurationFileVersionData()
522522
{
523523
// Compare the versions
524524
// Resource Types
525-
if (officialversiondata.ResourceTypes != currentversiondata.ResourceTypes)
525+
if (officialversiondata.resourcetypes != currentversiondata.resourcetypes)
526526
{
527527
versiondata.Add("<h5>Resource Types</h5><hr /><div>The Resource Types Configuration is out of date!<br /><br />It is recommended that you refresh your resource types to the latest configuration.<br /><br /><span class=\"fw-bold\">To Refresh:</span><ul><li>Expand the <span class=\"fw-bold\">Types</span> section</li><li>Expand the <span class=\"fw-bold\">Configuration</span> section</li><li>Select the <span class=\"fw-bold\">Refresh</span> option</li></ul></div><br />");
528528
}
529529

530530
// Resource Locations
531-
if (officialversiondata.ResourceLocations != currentversiondata.ResourceLocations)
531+
if (officialversiondata.resourcelocations != currentversiondata.resourcelocations)
532532
{
533533
versiondata.Add("<h5>Resource Locations</h5><hr /><div>The Resource Locations Configuration is out of date!<br /><br />It is recommended that you refresh your resource locations to the latest configuration.<br /><br /><span class=\"fw-bold\">To Refresh:</span><ul><li>Expand the <span class=\"fw-bold\">Locations</span> section</li><li>Expand the <span class=\"fw-bold\">Configuration</span> section</li><li>Select the <span class=\"fw-bold\">Refresh</span> option</li></ul></div><br />");
534534
}
@@ -571,14 +571,14 @@ public static async Task UpdateConfigurationFileVersion(string fileName)
571571
switch (fileName)
572572
{
573573
case "resourcetypes":
574-
currentversiondata.ResourceTypes = officialversiondata.ResourceTypes;
574+
currentversiondata.resourcetypes = officialversiondata.resourcetypes;
575575
break;
576576
case "resourcelocations":
577-
currentversiondata.ResourceLocations = officialversiondata.ResourceLocations;
577+
currentversiondata.resourcelocations = officialversiondata.resourcelocations;
578578
break;
579579
}
580580
// Update the current configuration file version data
581-
await FileSystemHelper.WriteFile("configurationfileversions.json", JsonSerializer.Serialize(currentversiondata), "settings/");
581+
await FileSystemHelper.WriteFile("configurationfileversions.json", JsonSerializer.Serialize(currentversiondata), "");
582582
}
583583
}
584584
}

src/Models/ConfigurationFileVersionData.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ public class ConfigurationFileVersionData
88
/// <summary>
99
/// Gets or sets the resource types.
1010
/// </summary>
11-
public string ResourceTypes { get; set; } = "0.0.0";
11+
public string resourcetypes { get; set; } = "0.0.0";
1212

1313
/// <summary>
1414
/// Gets or sets the resource locations.
1515
/// </summary>
16-
public string ResourceLocations { get; set; } = "0.0.0";
16+
public string resourcelocations { get; set; } = "0.0.0";
1717
}
1818
}

src/programsettings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"FeedbackURL": "https://forms.office.com/r/M2EZLg6zKq",
33
"latestNewsEnabled": "false",
4-
"toolVersion":"4.2.0"
4+
"toolVersion":"4.2.1"
55
}

0 commit comments

Comments
 (0)