mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Add .DirIcon to AppImages and lint AppImage on cross compile
This commit is contained in:
@@ -30,6 +30,7 @@ public class LinuxPackCommandRunner : PackageBuilder<LinuxPackOptions>
|
||||
var icon = Options.Icon ?? HelperFile.GetDefaultAppIcon(RuntimeOs.Linux);
|
||||
var iconFilename = Options.PackId + Path.GetExtension(icon);
|
||||
File.Copy(icon, Path.Combine(dir.FullName, iconFilename), true);
|
||||
File.Copy(icon, Path.Combine(dir.FullName, ".DirIcon"), true);
|
||||
|
||||
var categories = String.IsNullOrWhiteSpace(Options.Categories)
|
||||
? "Utility"
|
||||
|
||||
@@ -44,7 +44,7 @@ public class CrossCompile
|
||||
[InlineData("from-win-targets-linux")]
|
||||
[InlineData("from-linux-targets-linux")]
|
||||
[InlineData("from-osx-targets-linux")]
|
||||
public void RunCrossAppLinux(string artifactId)
|
||||
public async Task RunCrossAppLinux(string artifactId)
|
||||
{
|
||||
using var logger = _output.BuildLoggerFor<CrossCompile>();
|
||||
Skip.If(
|
||||
@@ -61,6 +61,19 @@ public class CrossCompile
|
||||
var output = Exe.InvokeAndThrowIfNonZero(artifactPath, new[] { "test" }, null);
|
||||
logger.LogInformation(output);
|
||||
Assert.EndsWith(artifactId, output.Trim());
|
||||
|
||||
var appImageLintPath = PathHelper.GetTestRootPath("appimagelint.AppImage");
|
||||
if (!File.Exists(appImageLintPath)) {
|
||||
var downloader = HttpUtil.CreateDefaultDownloader();
|
||||
await downloader.DownloadFile(
|
||||
"https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage",
|
||||
appImageLintPath,
|
||||
_ => { });
|
||||
Chmod.ChmodFileAsExecutable(appImageLintPath);
|
||||
}
|
||||
|
||||
var lintOutput = Exe.InvokeAndThrowIfNonZero(appImageLintPath, new[] { artifactPath }, null);
|
||||
logger.LogInformation(lintOutput);
|
||||
}
|
||||
|
||||
[SkippableTheory]
|
||||
|
||||
Reference in New Issue
Block a user