Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions Editor/Distros/ItchDistro.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,23 @@ async Task Distribute(BuildPath buildPath, TaskToken task)
}
}

var args = string.Format(
"push '{0}' '{1}:{2}' --userversion '{3}' --ignore='*.DS_Store' --ignore='build.json'",
path, project, channel, Application.version
);

await Execute(new ExecutionArgs(butlerPath, args), task);
var startInfo = new System.Diagnostics.ProcessStartInfo();
var argv = startInfo.ArgumentList;

argv.Add("push");
argv.Add(path);
argv.Add($"{project}:{channel}");
argv.Add($"--userversion"); argv.Add(Application.version);
argv.Add("--ignore"); argv.Add("*.DS_Store");
argv.Add("--ignore"); argv.Add("build.json");

startInfo.FileName = butlerPath;
startInfo.UseShellExecute = false;

var argvStr = String.Join("> <", argv);
task.Report(0, description: $"Executing {butlerPath}: <{argvStr}>");

await Execute(new ExecutionArgs() { startInfo = startInfo }, task);
}
}

Expand Down
39 changes: 22 additions & 17 deletions Editor/Distros/ZipDistro.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//

using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
Expand Down Expand Up @@ -280,23 +279,26 @@ protected async Task<BuildPath> Zip(BuildPath buildPath, TaskToken task)
}

// Run 7za command to create ZIP file
var excludes = "";

var startInfo = new System.Diagnostics.ProcessStartInfo();
var argv = startInfo.ArgumentList;
var inputName = Path.GetFileName(basePath);

argv.Add("a");
argv.Add(outputPath);
argv.Add(inputName);
argv.Add($"-mx{(int)compression}");

foreach (var pattern in ZipIgnore) {
excludes += @" -xr\!'" + pattern + "'";
argv.Add(@"-xr!" + pattern);
}

var inputName = Path.GetFileName(basePath);
var args = string.Format(
"a '{0}' '{1}' -mx{2} {3}",
outputPath, inputName, (int)compression, excludes
);

var startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.FileName = sevenZPath;
startInfo.Arguments = args;
startInfo.WorkingDirectory = Path.GetDirectoryName(basePath);
startInfo.UseShellExecute = false;

task.Report(0, description: $"Archiving {inputName}");
var argvStr = String.Join("> <", argv);
task.Report(0, description: $"Archiving {inputName}: <{argvStr}>");

await Execute(new ExecutionArgs() { startInfo = startInfo }, task);

Expand All @@ -313,11 +315,14 @@ protected async Task RenameRoot(string archivePath, string oldName, string newNa
throw new Exception("ZipDistro: Path to archive does not exist: " + archivePath);
}

var args = string.Format(
"rn '{0}' '{1}' '{2}'",
archivePath, oldName, newName
);
await Execute(new ExecutionArgs(Get7ZipPath(), args), task);
var startInfo = new System.Diagnostics.ProcessStartInfo(Get7ZipPath());
var argv = startInfo.ArgumentList;
argv.Add("rn");
argv.Add(archivePath);
argv.Add(oldName);
argv.Add(newName);

await Execute(new ExecutionArgs(startInfo), task);
}

protected override async Task RunDistribute(IEnumerable<BuildPath> buildPaths, TaskToken task)
Expand Down