Skip to content

Commit

Permalink
Make EngineVersion nullable
Browse files Browse the repository at this point in the history
FUCK ignore that previous commit, I forgot to push this before merging
the PR.
  • Loading branch information
PJB3005 committed Jul 14, 2024
1 parent 15f4512 commit aa6c64a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Robust.Cdn/Controllers/ForkBuildPageController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public sealed class Version
{
public required string Name;
public required DateTime PublishedTime;
public required string EngineVersion;
public required string? EngineVersion;
public required VersionServer[] Servers;
}

Expand All @@ -94,6 +94,6 @@ private sealed class DbVersion
public required int Id { get; set; }
public required string Name { get; set; }
public required DateTime PublishedTime { get; set; }
public required string EngineVersion { get; set; }
public required string? EngineVersion { get; set; }
}
}
3 changes: 2 additions & 1 deletion Robust.Cdn/ManifestMigrations/Script0001_Init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ CREATE TABLE ForkVersion(
ClientSha256 BLOB NOT NULL,

-- Not strictly necessary, but I'll save it here anyways.
EngineVersion TEXT NOT NULL,
-- NULL for old imported builds before this value was tracked.
EngineVersion TEXT NULL,

-- Whether this version is available for servers to download.
-- This is updated after CDN content ingestion finishes.
Expand Down
7 changes: 5 additions & 2 deletions Robust.Cdn/Views/ForkBuildPage/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@
<dd><span class="versionNumber">@version.Name</span></dd>
<dt>Date:</dt>
<dd><time datetime="@version.PublishedTime.ToString("O")">@version.PublishedTime.ToString("f") UTC</time></dd>
<dt>Engine Version:</dt>
<dd><span class="versionNumber">@version.EngineVersion</span></dd>
@if (version.EngineVersion is { } engineVersion)
{
<dt>Engine Version:</dt>
<dd><span class="versionNumber">@engineVersion</span></dd>
}
</dl>
<h3>Download</h3>
<ul class="build-download-list">
Expand Down

0 comments on commit aa6c64a

Please sign in to comment.