Skip to content

Commit

Permalink
Merge pull request #105 from BryanSoltis/main
Browse files Browse the repository at this point in the history
2024-06-21 - BryanSoltis - v4.2.1 Updates
  • Loading branch information
BryanSoltis authored Jun 21, 2024
2 parents 86d8a69 + b8cfcd5 commit 58479b6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/AzureNamingTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>4.2.0</Version>
<Version>4.2.1</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<UserSecretsId>eca63fb9-b7f9-454f-910b-5088ae877085</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
Expand Down
14 changes: 7 additions & 7 deletions src/Helpers/ConfigurationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,13 +478,13 @@ public static async Task<string> GetCurrentConfigFileVersionData()
string versiondatajson = String.Empty;
try
{
versiondatajson = await FileSystemHelper.ReadFile("configurationfileversions.json");
versiondatajson = await FileSystemHelper.ReadFile("configurationfileversions.json", "");
// Check if the user has any version data. This value will be '[]' if not.
if (versiondatajson == "[]")
{
// Create new version data with default values in /settings file
ConfigurationFileVersionData? versiondata = new();
await FileSystemHelper.WriteFile("configurationfileversions.json", JsonSerializer.Serialize(versiondata), "settings/");
await FileSystemHelper.WriteFile("configurationfileversions.json", JsonSerializer.Serialize(versiondata), "");
versiondatajson = JsonSerializer.Serialize(versiondata);
}
}
Expand Down Expand Up @@ -522,13 +522,13 @@ public static async Task<List<string>> VerifyConfigurationFileVersionData()
{
// Compare the versions
// Resource Types
if (officialversiondata.ResourceTypes != currentversiondata.ResourceTypes)
if (officialversiondata.resourcetypes != currentversiondata.resourcetypes)
{
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 />");
}

// Resource Locations
if (officialversiondata.ResourceLocations != currentversiondata.ResourceLocations)
if (officialversiondata.resourcelocations != currentversiondata.resourcelocations)
{
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 />");
}
Expand Down Expand Up @@ -571,14 +571,14 @@ public static async Task UpdateConfigurationFileVersion(string fileName)
switch (fileName)
{
case "resourcetypes":
currentversiondata.ResourceTypes = officialversiondata.ResourceTypes;
currentversiondata.resourcetypes = officialversiondata.resourcetypes;
break;
case "resourcelocations":
currentversiondata.ResourceLocations = officialversiondata.ResourceLocations;
currentversiondata.resourcelocations = officialversiondata.resourcelocations;
break;
}
// Update the current configuration file version data
await FileSystemHelper.WriteFile("configurationfileversions.json", JsonSerializer.Serialize(currentversiondata), "settings/");
await FileSystemHelper.WriteFile("configurationfileversions.json", JsonSerializer.Serialize(currentversiondata), "");
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Models/ConfigurationFileVersionData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ public class ConfigurationFileVersionData
/// <summary>
/// Gets or sets the resource types.
/// </summary>
public string ResourceTypes { get; set; } = "0.0.0";
public string resourcetypes { get; set; } = "0.0.0";

/// <summary>
/// Gets or sets the resource locations.
/// </summary>
public string ResourceLocations { get; set; } = "0.0.0";
public string resourcelocations { get; set; } = "0.0.0";
}
}
2 changes: 1 addition & 1 deletion src/programsettings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"FeedbackURL": "https://forms.office.com/r/M2EZLg6zKq",
"latestNewsEnabled": "false",
"toolVersion":"4.2.0"
"toolVersion":"4.2.1"
}

0 comments on commit 58479b6

Please sign in to comment.