mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-09-23 09:49:02 +00:00
remove numeric versioning for upstream merge
This commit is contained in:
parent
8f861ff335
commit
3e7d8eccbc
3 changed files with 1 additions and 26 deletions
|
@ -4,5 +4,4 @@ public class CustomizationConfiguration
|
||||||
{
|
{
|
||||||
public string ServerName { get; set; } = "Project Lighthouse";
|
public string ServerName { get; set; } = "Project Lighthouse";
|
||||||
public string EnvironmentName { get; set; } = "project-lighthouse";
|
public string EnvironmentName { get; set; } = "project-lighthouse";
|
||||||
public bool UseLessReliableNumericRevisionNumberingSystem { get; set; } = false;
|
|
||||||
}
|
}
|
|
@ -13,19 +13,7 @@ public static class VersionHelper
|
||||||
{
|
{
|
||||||
CommitHash = ResourceHelper.ReadManifestFile("gitVersion.txt");
|
CommitHash = ResourceHelper.ReadManifestFile("gitVersion.txt");
|
||||||
Branch = ResourceHelper.ReadManifestFile("gitBranch.txt");
|
Branch = ResourceHelper.ReadManifestFile("gitBranch.txt");
|
||||||
bool isShallowRepo = ResourceHelper.ReadManifestFile("gitIsShallowRepo.txt") == "true";
|
commitNumber = $"{CommitHash}_{Build}";
|
||||||
if (isShallowRepo)
|
|
||||||
{
|
|
||||||
Logger.Warn
|
|
||||||
(
|
|
||||||
"The UseLessReliavleNumericRevisionNumberingSystem option is not supported for builds made from a shallow clone." +
|
|
||||||
"Please perform a full clone if you want to use numeric revision numbers." +
|
|
||||||
"UseLessReliavleNumericRevisionNumberingSystem is now disabled.",
|
|
||||||
LogArea.Startup
|
|
||||||
);
|
|
||||||
ServerConfiguration.Instance.Customization.UseLessReliableNumericRevisionNumberingSystem = false;
|
|
||||||
}
|
|
||||||
commitNumber = ServerConfiguration.Instance.Customization.UseLessReliableNumericRevisionNumberingSystem ? ResourceHelper.ReadManifestFile("gitRevCount.txt") : $"{CommitHash}_{Build}";
|
|
||||||
OrdinalCommitNumber = (Branch == "main") ? $"r{commitNumber}" : $"{Branch}_r{commitNumber}";
|
OrdinalCommitNumber = (Branch == "main") ? $"r{commitNumber}" : $"{Branch}_r{commitNumber}";
|
||||||
|
|
||||||
string remotesFile = ResourceHelper.ReadManifestFile("gitRemotes.txt");
|
string remotesFile = ResourceHelper.ReadManifestFile("gitRemotes.txt");
|
||||||
|
@ -63,8 +51,6 @@ public static class VersionHelper
|
||||||
"Please make sure you are properly disclosing the source code to any users who may be using this instance.",
|
"Please make sure you are properly disclosing the source code to any users who may be using this instance.",
|
||||||
LogArea.Startup
|
LogArea.Startup
|
||||||
);
|
);
|
||||||
if (ServerConfiguration.Instance.Customization.UseLessReliableNumericRevisionNumberingSystem) // remove redundancy
|
|
||||||
OrdinalCommitNumber = $"{Branch}-dirty_r{commitNumber}";
|
|
||||||
CanCheckForUpdates = false;
|
CanCheckForUpdates = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,14 +48,6 @@
|
||||||
<EmbeddedResource Include="chatCensoredList.txt">
|
<EmbeddedResource Include="chatCensoredList.txt">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<None Remove="gitRevCount.txt" />
|
|
||||||
<EmbeddedResource Include="gitRevCount.txt">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<None Remove="gitIsShallowRepo.txt" />
|
|
||||||
<EmbeddedResource Include="gitIsShallowRepo.txt">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</EmbeddedResource>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -67,8 +59,6 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||||
<Exec Command="git rev-parse --is-shallow-repository > "$(ProjectDir)/gitIsShallowRepo.txt"" />
|
|
||||||
<Exec Command="git describe --long --always --dirty --exclude=\* --abbrev=8 > "$(ProjectDir)/gitVersion.txt"" />
|
|
||||||
<Exec Command="git rev-list HEAD --count > "$(ProjectDir)/gitRevCount.txt"" />
|
<Exec Command="git rev-list HEAD --count > "$(ProjectDir)/gitRevCount.txt"" />
|
||||||
<Exec Command="git branch --show-current > "$(ProjectDir)/gitBranch.txt"" />
|
<Exec Command="git branch --show-current > "$(ProjectDir)/gitBranch.txt"" />
|
||||||
<Exec Command="git remote -v > "$(ProjectDir)/gitRemotes.txt"" />
|
<Exec Command="git remote -v > "$(ProjectDir)/gitRemotes.txt"" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue