Merge pull request #1018 from wabbajack-tools/version-bump-and-fixes

Version bump and fixes
This commit is contained in:
Timothy Baldridge 2020-08-08 06:56:26 -06:00 committed by GitHub
commit ec40249e5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 57 additions and 12 deletions

View File

@ -1,5 +1,13 @@
### Changelog
#### Version - 2.2.0.0 - 8/7/2020
* Can now use NTFS XPRESS16 compression to reduce install sizes (optional in the settings panel)
* Better valid directory detection during install
* Prime the Hash cache during install so that we don't have to re-hash during a modlist update
* Better detection and handling of midden files
* Reworked the installer to use less temporary storage during install, keeps fewer archives open at once
* Launcher now passes arguments to the main Wabbajack.exe application
#### Version - 2.1.3.4 - 7/28/2020
* Fixes for Tar Files (for realz this time)
* Watch disk usage, throw an error if disk usage gets too high

View File

@ -6,8 +6,8 @@
<AssemblyName>wabbajack-cli</AssemblyName>
<Company>Wabbajack</Company>
<Platforms>x64</Platforms>
<AssemblyVersion>2.1.3.4</AssemblyVersion>
<FileVersion>2.1.3.4</FileVersion>
<AssemblyVersion>2.2.0.0</AssemblyVersion>
<FileVersion>2.2.0.0</FileVersion>
<Copyright>Copyright © 2019-2020</Copyright>
<Description>An automated ModList installer</Description>
<PublishReadyToRun>true</PublishReadyToRun>

View File

@ -4,8 +4,8 @@
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWPF>true</UseWPF>
<AssemblyVersion>2.1.3.4</AssemblyVersion>
<FileVersion>2.1.3.4</FileVersion>
<AssemblyVersion>2.2.0.0</AssemblyVersion>
<FileVersion>2.2.0.0</FileVersion>
<Copyright>Copyright © 2019-2020</Copyright>
<Description>Wabbajack Application Launcher</Description>
<PublishReadyToRun>true</PublishReadyToRun>

View File

@ -239,5 +239,20 @@ namespace Wabbajack.Lib
}
throw new HttpException(result);
}
public static async Task<Uri?> GetMirrorUrl(Hash archiveHash)
{
var client = await GetClient();
try
{
var result =
await client.GetStringAsync($"{Consts.WabbajackBuildServerUri}/mirror/{archiveHash.ToHex()}");
return new Uri(result);
}
catch (HttpException ex)
{
return null;
}
}
}
}

View File

@ -128,11 +128,12 @@ namespace Wabbajack.Lib.Downloaders
Utils.Log($"Looking for patch for {archive.Name} ({(long)archive.Hash} {archive.Hash.ToHex()} -> {(long)result.Archive!.Hash} {result.Archive!.Hash.ToHex()})");
var patchResult = await ClientAPI.GetModUpgrade(archive, result.Archive!);
Utils.Log($"Downloading patch for {archive.Name}");
Utils.Log($"Downloading patch for {archive.Name} from {patchResult}");
var tempFile = new TempFile();
using var response = await (await ClientAPI.GetClient()).GetAsync(patchResult);
await tempFile.Path.WriteAllAsync(await response.Content.ReadAsStreamAsync());
response.Dispose();
@ -157,9 +158,12 @@ namespace Wabbajack.Lib.Downloaders
{
try
{
var url = await ClientAPI.GetMirrorUrl(archive.Hash);
if (url == null) return false;
var newArchive =
new Archive(
new WabbajackCDNDownloader.State(new Uri($"{Consts.WabbajackMirror}{archive.Hash.ToHex()}")))
new WabbajackCDNDownloader.State(url))
{
Hash = archive.Hash, Size = archive.Size, Name = archive.Name
};

View File

@ -105,7 +105,7 @@ namespace Wabbajack.Server.Test
patcher.NoCleaning = true;
var sql = Fixture.GetService<SqlService>();
var oldFileData = Encoding.UTF8.GetBytes("Cheese for Everyone!");
var oldFileData = Encoding.UTF8.GetBytes("Cheese for Everyone!" + Guid.NewGuid());
var newFileData = Encoding.UTF8.GetBytes("Forks for Everyone!");
var oldDataHash = oldFileData.xxHash();
var newDataHash = newFileData.xxHash();

View File

@ -145,6 +145,16 @@ namespace Wabbajack.BuildServer.Controllers
await _sql.PurgePatch(hash, rationale);
return Ok("Purged");
}
[HttpGet]
[Authorize(Roles = "User")]
[Route("/mirror/{hashAsHex}")]
public async Task<IActionResult> HaveHash(string hashAsHex)
{
var result = await _sql.HaveMirror(Hash.FromHex(hashAsHex));
if (result) return Ok($"https://{(await _creds).Username}.b-cdn.net/{hashAsHex}");
return NotFound("Not Mirrored");
}
}

View File

@ -75,5 +75,13 @@ namespace Wabbajack.Server.DataLayer
});
}
}
public async Task<bool> HaveMirror(Hash hash)
{
await using var conn = await Open();
return await conn.QueryFirstOrDefaultAsync<Hash>("SELECT Hash FROM dbo.MirroredFiles WHERE Hash = @Hash",
new {Hash = hash}) != default;
}
}
}

View File

@ -203,7 +203,7 @@ namespace Wabbajack.Server.Services
try
{
_logger.Log(LogLevel.Information,
$"Uploading {patchFile.Size.ToFileSizeString()} patch file to CDN");
$"Uploading {patchFile.Size.ToFileSizeString()} patch file to CDN {patchName}");
using var client = await GetBunnyCdnFtpClient();
await client.UploadFileAsync((string)patchFile, patchName, FtpRemoteExists.Overwrite);

View File

@ -3,8 +3,8 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyVersion>2.1.3.4</AssemblyVersion>
<FileVersion>2.1.3.4</FileVersion>
<AssemblyVersion>2.2.0.0</AssemblyVersion>
<FileVersion>2.2.0.0</FileVersion>
<Copyright>Copyright © 2019-2020</Copyright>
<Description>Wabbajack Server</Description>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>

View File

@ -6,8 +6,8 @@
<UseWPF>true</UseWPF>
<Platforms>x64</Platforms>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<AssemblyVersion>2.1.3.4</AssemblyVersion>
<FileVersion>2.1.3.4</FileVersion>
<AssemblyVersion>2.2.0.0</AssemblyVersion>
<FileVersion>2.2.0.0</FileVersion>
<Copyright>Copyright © 2019-2020</Copyright>
<Description>An automated ModList installer</Description>
<PublishReadyToRun>true</PublishReadyToRun>