mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-24 05:27:30 +01:00
Fallback method for missing BYOND linux zips
This commit is contained in:
@@ -111,6 +111,14 @@ jobs:
|
||||
VERSIONS=$(curl https://www.byond.com/download/version.txt)
|
||||
FULL_VERSION=$(echo "$VERSIONS" | tail -n1)
|
||||
echo "EDGE version evaluated to $FULL_VERSION"
|
||||
|
||||
# Also needs updating in ByondTest.cs
|
||||
declare -A missing_linux_releases=([515.1612]="515.1611")
|
||||
|
||||
if [[ -n "${missing_linux_releases[$FULL_VERSION]}" ]] ; then
|
||||
echo "$FULL_VERSION does not have a linux zip, falling back to ${missing_linux_releases[$FULL_VERSION]}"
|
||||
FULL_VERSION=${missing_linux_releases[$FULL_VERSION]}
|
||||
fi
|
||||
fi
|
||||
if [[ ! -f $HOME/byond-zips-cache/linux/$FULL_VERSION.zip ]] ; then
|
||||
BYOND_MAJOR=${FULL_VERSION%.*}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -58,7 +59,23 @@ namespace Tgstation.Server.Tests.Live.Instance
|
||||
using var reader = new StreamReader(stream, Encoding.UTF8, false, -1, true);
|
||||
var text = await reader.ReadToEndAsync();
|
||||
var splits = text.Split('\n', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries);
|
||||
return edgeVersion = Version.Parse(splits.Last());
|
||||
|
||||
var targetVersion = splits.Last();
|
||||
|
||||
var missingVersionMap = new PlatformIdentifier().IsWindows
|
||||
? new Dictionary<string, string>()
|
||||
{
|
||||
}
|
||||
// linux map also needs updating in CI
|
||||
: new Dictionary<string, string>()
|
||||
{
|
||||
{ "515.1612", "515.1611" }
|
||||
};
|
||||
|
||||
if (missingVersionMap.TryGetValue(targetVersion, out var remappedVersion))
|
||||
targetVersion = remappedVersion;
|
||||
|
||||
return edgeVersion = Version.Parse(targetVersion);
|
||||
}
|
||||
|
||||
async Task RunPartOne(CancellationToken cancellationToken)
|
||||
|
||||
Reference in New Issue
Block a user