Merge pull request #105 from BryanSoltis/main
2024-06-21 - BryanSoltis - v4.2.1 Updates
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -478,13 +478,13 @@ namespace AzureNamingTool.Helpers
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -522,13 +522,13 @@ namespace AzureNamingTool.Helpers
|
||||
{
|
||||
// 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 />");
|
||||
}
|
||||
@@ -571,14 +571,14 @@ namespace AzureNamingTool.Helpers
|
||||
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), "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
/// <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";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"FeedbackURL": "https://forms.office.com/r/M2EZLg6zKq",
|
||||
"latestNewsEnabled": "false",
|
||||
"toolVersion":"4.2.0"
|
||||
"toolVersion":"4.2.1"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user