Standardize naming to "Webpanel"

This commit is contained in:
Jordan Dominion
2023-11-16 23:14:14 -05:00
parent 3bd78163c7
commit 17bda5ef48
9 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ WORKDIR /repo/build
COPY build/Common.props Common.props
COPY build/NugetCommon.props NugetCommon.props
COPY build/Version.props Version.props
COPY build/ControlPanelVersion.props ControlPanelVersion.props
COPY build/WebpanelVersion.props WebpanelVersion.props
COPY build/SrcCommon.props SrcCommon.props
WORKDIR /repo/src/Tgstation.Server.Host
+1 -1
View File
@@ -1,7 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This is the authorative version list -->
<!-- Integration tests will ensure they match across the board -->
<Import Project="ControlPanelVersion.props" />
<Import Project="WebpanelVersion.props" />
<PropertyGroup>
<TgsCoreVersion>5.17.3</TgsCoreVersion>
<TgsConfigVersion>4.7.1</TgsConfigVersion>
@@ -1,6 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- This is in it's own file to help incremental building, changing it causes a complete rebuild of the web panel -->
<TgsControlPanelVersion>5.1.0</TgsControlPanelVersion>
<TgsWebpanelVersion>5.1.0</TgsWebpanelVersion>
</PropertyGroup>
</Project>
@@ -558,7 +558,7 @@ namespace Tgstation.Server.Host.Core
logger.LogTrace("Configuration version: {configVersion}", GeneralConfiguration.CurrentConfigVersion);
logger.LogTrace("DMAPI Interop version: {interopVersion}", DMApiConstants.InteropVersion);
if (controlPanelConfiguration.Enable)
logger.LogTrace("Web control panel version: {webCPVersion}", MasterVersionsAttribute.Instance.RawControlPanelVersion);
logger.LogTrace("Webpanel version: {webCPVersion}", MasterVersionsAttribute.Instance.RawWebpanelVersion);
logger.LogDebug("Starting hosting on port {httpApiPort}...", serverPortProvider.HttpApiPort);
}
@@ -29,7 +29,7 @@ namespace Tgstation.Server.Host.Properties
/// <summary>
/// The <see cref="Version"/> <see cref="string"/> of the control panel version built.
/// </summary>
public string RawControlPanelVersion { get; }
public string RawWebpanelVersion { get; }
/// <summary>
/// The <see cref="Version"/> <see cref="string"/> of the control panel version built.
@@ -46,19 +46,19 @@ namespace Tgstation.Server.Host.Properties
/// </summary>
/// <param name="rawConfigurationVersion">The value of <see cref="RawConfigurationVersion"/>.</param>
/// <param name="rawInteropVersion">The value of <see cref="RawInteropVersion"/>.</param>
/// <param name="rawControlPanelVersion">The value of <see cref="RawControlPanelVersion"/>.</param>
/// <param name="rawWebpanelVersion">The value of <see cref="RawWebpanelVersion"/>.</param>
/// <param name="rawHostWatchdogVersion">The value of <see cref="RawHostWatchdogVersion"/>.</param>
/// <param name="rawMariaDBRedistVersion">The value of <see cref="RawMariaDBRedistVersion"/>.</param>
public MasterVersionsAttribute(
string rawConfigurationVersion,
string rawInteropVersion,
string rawControlPanelVersion,
string rawWebpanelVersion,
string rawHostWatchdogVersion,
string rawMariaDBRedistVersion)
{
RawConfigurationVersion = rawConfigurationVersion ?? throw new ArgumentNullException(nameof(rawConfigurationVersion));
RawInteropVersion = rawInteropVersion ?? throw new ArgumentNullException(nameof(rawInteropVersion));
RawControlPanelVersion = rawControlPanelVersion ?? throw new ArgumentNullException(nameof(rawControlPanelVersion));
RawWebpanelVersion = rawWebpanelVersion ?? throw new ArgumentNullException(nameof(rawWebpanelVersion));
RawHostWatchdogVersion = rawHostWatchdogVersion ?? throw new ArgumentNullException(nameof(rawHostWatchdogVersion));
RawMariaDBRedistVersion = rawMariaDBRedistVersion ?? throw new ArgumentNullException(nameof(rawMariaDBRedistVersion));
}
@@ -22,17 +22,17 @@
<DefineConstants>$(DefineConstants);NO_WEBPANEL</DefineConstants>
</PropertyGroup>
<Target Condition="'$(TGS_HOST_NO_WEBPANEL)' != 'true'" Name="ClientInstall" BeforeTargets="ResolveAssemblyReferences" Inputs="../../build/ControlPanelVersion.props" Outputs="$(NpmInstallStampFile)">
<Target Condition="'$(TGS_HOST_NO_WEBPANEL)' != 'true'" Name="ClientInstall" BeforeTargets="ResolveAssemblyReferences" Inputs="../../build/WebpanelVersion.props" Outputs="$(NpmInstallStampFile)">
<Message Text="Pulling web control panel..." Importance="high" />
<RemoveDir Directories="ClientApp" />
<Exec Command="git clone https://github.com/tgstation/tgstation-server-webpanel --branch v$(TgsControlPanelVersion) --depth 1 ClientApp" />
<Exec Command="git clone https://github.com/tgstation/tgstation-server-webpanel --branch v$(TgsWebpanelVersion) --depth 1 ClientApp" />
<RemoveDir Directories="ClientApp/.git" /> <!-- Allows git clean to clean it out -->
<Message Text="Restoring yarn packages..." Importance="high" />
<Exec WorkingDirectory="ClientApp" Command="npx --yes yarn@$(TgsYarnVersion) install --immutable" />
<Touch Files="$(NpmInstallStampFile)" AlwaysCreate="true" />
</Target>
<Target Condition="'$(TGS_HOST_NO_WEBPANEL)' != 'true'" Name="NpmBuild" BeforeTargets="BeforeBuild" DependsOnTargets="ClientInstall" Inputs="../../build/ControlPanelVersion.props" Outputs="wwwroot\index.html">
<Target Condition="'$(TGS_HOST_NO_WEBPANEL)' != 'true'" Name="NpmBuild" BeforeTargets="BeforeBuild" DependsOnTargets="ClientInstall" Inputs="../../build/WebpanelVersion.props" Outputs="wwwroot\index.html">
<Message Text="Building web control panel..." Importance="high" />
<Exec WorkingDirectory="ClientApp" Command="npx --yes yarn@$(TgsYarnVersion) run msbuild" />
</Target>
@@ -47,7 +47,7 @@
<AssemblyAttributes Include="Tgstation.Server.Host.Properties.MasterVersionsAttribute">
<_Parameter1>$(TgsConfigVersion)</_Parameter1>
<_Parameter2>$(TgsInteropVersion)</_Parameter2>
<_Parameter3>$(TgsControlPanelVersion)</_Parameter3>
<_Parameter3>$(TgsWebpanelVersion)</_Parameter3>
<_Parameter4>$(TgsHostWatchdogVersion)</_Parameter4>
<_Parameter5>$(TgsMariaDBRedistVersion)</_Parameter5>
</AssemblyAttributes>
+2 -2
View File
@@ -284,11 +284,11 @@ namespace Tgstation.Server.Tests
[TestMethod]
public void TestControlPanelVersion()
{
var doc = XDocument.Load("../../../../../build/ControlPanelVersion.props");
var doc = XDocument.Load("../../../../../build/WebpanelVersion.props");
var project = doc.Root;
var controlPanelXmlNamespace = project.GetDefaultNamespace();
var controlPanelVersionsPropertyGroup = project.Elements().First(x => x.Name == controlPanelXmlNamespace + "PropertyGroup");
var versionString = controlPanelVersionsPropertyGroup.Element(controlPanelXmlNamespace + "TgsControlPanelVersion").Value;
var versionString = controlPanelVersionsPropertyGroup.Element(controlPanelXmlNamespace + "TgsWebpanelVersion").Value;
Assert.IsNotNull(versionString);
Assert.IsTrue(Version.TryParse(versionString, out var expected));
+1 -1
View File
@@ -26,7 +26,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{6FF654E6
build\BuildDox.ps1 = build\BuildDox.ps1
build\ci.runsettings = build\ci.runsettings
build\Common.props = build\Common.props
build\ControlPanelVersion.props = build\ControlPanelVersion.props
build\Dockerfile = build\Dockerfile
build\GenerateMigrations.sh = build\GenerateMigrations.sh
build\logo.svg = build\logo.svg
@@ -39,6 +38,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{6FF654E6
build\tgstation-server.service = build\tgstation-server.service
build\uac_elevation_manifest.xml = build\uac_elevation_manifest.xml
build\Version.props = build\Version.props
build\WebpanelVersion.props = build\WebpanelVersion.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tgstation.Server.Api", "src\Tgstation.Server.Api\Tgstation.Server.Api.csproj", "{8B4A208D-A48A-4A5D-8B94-E2661138865D}"
@@ -223,7 +223,7 @@ namespace Tgstation.Server.ReleaseNotes
string prefix;
const string PropsPath = "build/Version.props";
const string ControlPanelPropsPath = "build/ControlPanelVersion.props";
const string ControlPanelPropsPath = "build/WebpanelVersion.props";
var doc = XDocument.Load(PropsPath);
var project = doc.Root;
@@ -246,7 +246,7 @@ namespace Tgstation.Server.ReleaseNotes
var configVersion = Version.Parse(versionsPropertyGroup.Element(xmlNamespace + "TgsConfigVersion").Value);
var dmApiVersion = Version.Parse(versionsPropertyGroup.Element(xmlNamespace + "TgsDmapiVersion").Value);
var interopVersion = Version.Parse(versionsPropertyGroup.Element(xmlNamespace + "TgsInteropVersion").Value);
var webControlVersion = Version.Parse(controlPanelVersionsPropertyGroup.Element(controlPanelXmlNamespace + "TgsControlPanelVersion").Value);
var webControlVersion = Version.Parse(controlPanelVersionsPropertyGroup.Element(controlPanelXmlNamespace + "TgsWebpanelVersion").Value);
var hostWatchdogVersion = Version.Parse(versionsPropertyGroup.Element(xmlNamespace + "TgsHostWatchdogVersion").Value);
if (webControlVersion.Major == 0)
@@ -608,14 +608,14 @@ namespace Tgstation.Server.ReleaseNotes
dict.Add(Component.NugetApi, Parse("TgsApiLibraryVersion"));
dict.Add(Component.NugetClient, Parse("TgsClientVersion"));
var webVersion = Parse("TgsControlPanelVersion");
var webVersion = Parse("TgsWebpanelVersion");
if (webVersion != null)
{
dict.Add(Component.WebControlPanel, webVersion);
}
else
{
var controlPanelVersionBytes = await RLR(() => client.Repository.Content.GetRawContentByRef(RepoOwner, RepoName, "build/ControlPanelVersion.props", mergeCommit));
var controlPanelVersionBytes = await RLR(() => client.Repository.Content.GetRawContentByRef(RepoOwner, RepoName, "build/WebpanelVersion.props", mergeCommit));
using (var ms = new MemoryStream(controlPanelVersionBytes))
doc = XDocument.Load(ms);
@@ -623,7 +623,7 @@ namespace Tgstation.Server.ReleaseNotes
project = doc.Root;
var controlPanelXmlNamespace = project.GetDefaultNamespace();
var controlPanelVersionsPropertyGroup = project.Elements().First(x => x.Name == controlPanelXmlNamespace + "PropertyGroup");
dict.Add(Component.WebControlPanel, Version.Parse(controlPanelVersionsPropertyGroup.Element(controlPanelXmlNamespace + "TgsControlPanelVersion").Value));
dict.Add(Component.WebControlPanel, Version.Parse(controlPanelVersionsPropertyGroup.Element(controlPanelXmlNamespace + "TgsWebpanelVersion").Value));
}
}