mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Update versions when uploading new modlists
This commit is contained in:
parent
04347bbd06
commit
81c93c6e18
@ -62,6 +62,7 @@ namespace Wabbajack.Lib.GitHub
|
||||
if (found == null) continue;
|
||||
|
||||
found.DownloadMetadata = newData;
|
||||
found.Version = newData.Version;
|
||||
|
||||
await WriteData(file, machineUrl, data.Hash, data.Lists);
|
||||
return;
|
||||
|
@ -139,6 +139,7 @@ namespace Wabbajack.Lib.ModListRegistry
|
||||
public Hash Hash { get; set; }
|
||||
public long Size { get; set; }
|
||||
|
||||
public Version Version { get; set; } = new();
|
||||
public long NumberOfArchives { get; set; }
|
||||
public long SizeOfArchives { get; set; }
|
||||
public long NumberOfInstalledFiles { get; set; }
|
||||
|
@ -22,7 +22,9 @@ namespace Wabbajack.Test
|
||||
Hash = Hash.FromLong(rnd.Next()),
|
||||
NumberOfArchives = rnd.Next(100),
|
||||
NumberOfInstalledFiles = rnd.Next(1000),
|
||||
SizeOfInstalledFiles = rnd.Next(1000000)
|
||||
SizeOfInstalledFiles = rnd.Next(1000000),
|
||||
Size = rnd.Next(10000),
|
||||
Version = new Version(1, 0, rnd.Next(10), 0)
|
||||
};
|
||||
await client.UpdateList("ci_tester", "ci_test", meta);
|
||||
|
||||
@ -30,6 +32,10 @@ namespace Wabbajack.Test
|
||||
var lst = updated.Lists.FirstOrDefault(l => l.Links.MachineURL == "ci_test");
|
||||
var newMeta = lst!.DownloadMetadata!;
|
||||
Assert.Equal(meta.Hash, newMeta.Hash);
|
||||
Assert.Equal(meta.Size, newMeta.Size);
|
||||
Assert.Equal(meta.Version, newMeta.Version);
|
||||
Assert.Equal(lst.Version, newMeta.Version);
|
||||
|
||||
Assert.Equal(meta.NumberOfArchives, newMeta.NumberOfArchives);
|
||||
Assert.Equal(meta.NumberOfInstalledFiles, newMeta.NumberOfInstalledFiles);
|
||||
Assert.Equal(meta.SizeOfInstalledFiles, newMeta.SizeOfInstalledFiles);
|
||||
|
Loading…
Reference in New Issue
Block a user