mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix for the website expecting lower case files
This commit is contained in:
parent
3c9792f7ea
commit
a372a14140
@ -52,7 +52,12 @@ namespace Wabbajack.Lib.GitHub
|
||||
|
||||
private async Task WriteData(List file, string machinenUrl, string dataHash, IReadOnlyList<ModlistMetadata> dataLists)
|
||||
{
|
||||
var updateRequest = new UpdateFileRequest($"New release of {machinenUrl}", dataLists.ToJson(prettyPrint:true), dataHash);
|
||||
var listData = dataLists.ToJson(prettyPrint: true);
|
||||
// the website requires all names be in lowercase;
|
||||
listData = GameRegistry.Games.Keys.Aggregate(listData,
|
||||
(current, g) => current.Replace($"\"game\": \"{g}\",", $"\"game\": \"{g.ToString().ToLower()}\","));
|
||||
|
||||
var updateRequest = new UpdateFileRequest($"New release of {machinenUrl}", listData, dataHash);
|
||||
await _client.Repository.Content.UpdateFile("wabbajack-tools", "mod-lists", PathNames[file], updateRequest);
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ namespace Wabbajack.BuildServer.Controllers
|
||||
if (definition.Author != user)
|
||||
return Forbid("File Id does not match authorized user");
|
||||
await _discord.Send(Channel.Ham, new DiscordMessage() {Content = $"{user} is deleting {definition.MungedName}, {definition.Size.ToFileSizeString()} to be freed"});
|
||||
_logger.Log(LogLevel.Information, $"Finalizing file upload {definition.OriginalFileName}");
|
||||
_logger.Log(LogLevel.Information, $"Deleting upload {definition.OriginalFileName}");
|
||||
|
||||
await DeleteFolderOrSilentlyFail($"{definition.MungedName}");
|
||||
|
||||
|
@ -12,7 +12,7 @@ namespace Wabbajack.Test
|
||||
{
|
||||
public class GitHubTests
|
||||
{
|
||||
//[Fact] - Disabled for build server, run locally
|
||||
//[Fact]// Disabled for build server, run locally
|
||||
public async Task CanLogIntoGithub()
|
||||
{
|
||||
var client = await Wabbajack.Lib.GitHub.Client.Get();
|
||||
|
Loading…
Reference in New Issue
Block a user