mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Convert all files to file-scoped name space
This commit is contained in:
@@ -7,10 +7,10 @@ using System.Threading.Tasks;
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Velopack.Packaging.Exceptions;
|
using Velopack.Packaging.Exceptions;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Unix
|
namespace Velopack.Packaging.Unix;
|
||||||
|
|
||||||
|
public class AppImageTool
|
||||||
{
|
{
|
||||||
public class AppImageTool
|
|
||||||
{
|
|
||||||
[SupportedOSPlatform("linux")]
|
[SupportedOSPlatform("linux")]
|
||||||
public static void CreateLinuxAppImage(string appDir, string outputFile, RuntimeCpu machine, ILogger logger)
|
public static void CreateLinuxAppImage(string appDir, string outputFile, RuntimeCpu machine, ILogger logger)
|
||||||
{
|
{
|
||||||
@@ -33,5 +33,4 @@ namespace Velopack.Packaging.Unix
|
|||||||
Exe.InvokeAndThrowIfNonZero(tool, new[] { appDir, outputFile }, null, envVar);
|
Exe.InvokeAndThrowIfNonZero(tool, new[] { appDir, outputFile }, null, envVar);
|
||||||
Chmod.ChmodFileAsExecutable(outputFile);
|
Chmod.ChmodFileAsExecutable(outputFile);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ using ELFSharp.ELF;
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Velopack.Packaging.Abstractions;
|
using Velopack.Packaging.Abstractions;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Unix.Commands
|
namespace Velopack.Packaging.Unix.Commands;
|
||||||
|
|
||||||
|
[SupportedOSPlatform("linux")]
|
||||||
|
public class LinuxPackCommandRunner : PackageBuilder<LinuxPackOptions>
|
||||||
{
|
{
|
||||||
[SupportedOSPlatform("linux")]
|
|
||||||
public class LinuxPackCommandRunner : PackageBuilder<LinuxPackOptions>
|
|
||||||
{
|
|
||||||
protected string PortablePackagePath { get; set; }
|
protected string PortablePackagePath { get; set; }
|
||||||
|
|
||||||
public LinuxPackCommandRunner(ILogger logger, IFancyConsole console)
|
public LinuxPackCommandRunner(ILogger logger, IFancyConsole console)
|
||||||
@@ -107,5 +107,4 @@ Categories=Development;
|
|||||||
progress(-1); // there is only one "file", so progress will not work
|
progress(-1); // there is only one "file", so progress will not work
|
||||||
return base.CreateDeltaPackage(progress, releasePkg, prevReleasePkg, outputPkg, mode);
|
return base.CreateDeltaPackage(progress, releasePkg, prevReleasePkg, outputPkg, mode);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Velopack.Packaging.Abstractions;
|
using Velopack.Packaging.Abstractions;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Unix.Commands
|
namespace Velopack.Packaging.Unix.Commands;
|
||||||
|
|
||||||
|
public class LinuxPackOptions : IPackOptions
|
||||||
{
|
{
|
||||||
public class LinuxPackOptions : IPackOptions
|
|
||||||
{
|
|
||||||
public DirectoryInfo ReleaseDir { get; set; }
|
public DirectoryInfo ReleaseDir { get; set; }
|
||||||
|
|
||||||
public string PackId { get; set; }
|
public string PackId { get; set; }
|
||||||
@@ -34,5 +34,4 @@ namespace Velopack.Packaging.Unix.Commands
|
|||||||
public string Channel { get; set; }
|
public string Channel { get; set; }
|
||||||
|
|
||||||
public bool PackIsAppDir { get; set; }
|
public bool PackIsAppDir { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Runtime.Versioning;
|
using System.Runtime.Versioning;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Windows
|
namespace Velopack.Packaging.Windows;
|
||||||
|
|
||||||
|
[SupportedOSPlatform("windows")]
|
||||||
|
[ExcludeFromCodeCoverage]
|
||||||
|
public static class AuthenticodeTools
|
||||||
{
|
{
|
||||||
[SupportedOSPlatform("windows")]
|
|
||||||
[ExcludeFromCodeCoverage]
|
|
||||||
public static class AuthenticodeTools
|
|
||||||
{
|
|
||||||
[DllImport("Wintrust.dll", PreserveSig = true, SetLastError = false)]
|
[DllImport("Wintrust.dll", PreserveSig = true, SetLastError = false)]
|
||||||
static extern uint WinVerifyTrust(IntPtr hWnd, IntPtr pgActionID, IntPtr pWinTrustData);
|
static extern uint WinVerifyTrust(IntPtr hWnd, IntPtr pgActionID, IntPtr pWinTrustData);
|
||||||
|
|
||||||
@@ -35,11 +35,11 @@ namespace Velopack.Packaging.Windows
|
|||||||
{
|
{
|
||||||
return winVerifyTrust(fileName) == 0;
|
return winVerifyTrust(fileName) == 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ExcludeFromCodeCoverage]
|
[ExcludeFromCodeCoverage]
|
||||||
internal struct WINTRUST_FILE_INFO : IDisposable
|
internal struct WINTRUST_FILE_INFO : IDisposable
|
||||||
{
|
{
|
||||||
public WINTRUST_FILE_INFO(string fileName, Guid subject)
|
public WINTRUST_FILE_INFO(string fileName, Guid subject)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -77,44 +77,44 @@ namespace Velopack.Packaging.Windows
|
|||||||
Marshal.FreeHGlobal(this.pgKnownSubject);
|
Marshal.FreeHGlobal(this.pgKnownSubject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum AllocMethod
|
enum AllocMethod
|
||||||
{
|
{
|
||||||
HGlobal, CoTaskMem
|
HGlobal, CoTaskMem
|
||||||
};
|
};
|
||||||
|
|
||||||
enum UnionChoice
|
enum UnionChoice
|
||||||
{
|
{
|
||||||
File = 1,
|
File = 1,
|
||||||
Catalog,
|
Catalog,
|
||||||
Blob,
|
Blob,
|
||||||
Signer,
|
Signer,
|
||||||
Cert
|
Cert
|
||||||
};
|
};
|
||||||
|
|
||||||
enum UiChoice
|
enum UiChoice
|
||||||
{
|
{
|
||||||
All = 1,
|
All = 1,
|
||||||
NoUI,
|
NoUI,
|
||||||
NoBad,
|
NoBad,
|
||||||
NoGood
|
NoGood
|
||||||
};
|
};
|
||||||
enum RevocationCheckFlags
|
enum RevocationCheckFlags
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
WholeChain
|
WholeChain
|
||||||
};
|
};
|
||||||
enum StateAction
|
enum StateAction
|
||||||
{
|
{
|
||||||
Ignore = 0,
|
Ignore = 0,
|
||||||
Verify,
|
Verify,
|
||||||
Close,
|
Close,
|
||||||
AutoCache,
|
AutoCache,
|
||||||
AutoCacheFlush
|
AutoCacheFlush
|
||||||
};
|
};
|
||||||
enum TrustProviderFlags
|
enum TrustProviderFlags
|
||||||
{
|
{
|
||||||
UseIE4Trust = 1,
|
UseIE4Trust = 1,
|
||||||
NoIE4Chain = 2,
|
NoIE4Chain = 2,
|
||||||
NoPolicyUsage = 4,
|
NoPolicyUsage = 4,
|
||||||
@@ -126,18 +126,18 @@ namespace Velopack.Packaging.Windows
|
|||||||
HashOnly = 512,
|
HashOnly = 512,
|
||||||
UseDefaultOSVerCheck = 1024,
|
UseDefaultOSVerCheck = 1024,
|
||||||
LifetimeSigning = 2048
|
LifetimeSigning = 2048
|
||||||
};
|
};
|
||||||
enum UIContext
|
enum UIContext
|
||||||
{
|
{
|
||||||
Execute = 0,
|
Execute = 0,
|
||||||
Install
|
Install
|
||||||
};
|
};
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
|
||||||
[ExcludeFromCodeCoverage]
|
[ExcludeFromCodeCoverage]
|
||||||
internal struct WINTRUST_DATA : IDisposable
|
internal struct WINTRUST_DATA : IDisposable
|
||||||
{
|
{
|
||||||
public WINTRUST_DATA(WINTRUST_FILE_INFO fileInfo)
|
public WINTRUST_DATA(WINTRUST_FILE_INFO fileInfo)
|
||||||
{
|
{
|
||||||
this.cbStruct = (uint) Marshal.SizeOf(typeof(WINTRUST_DATA));
|
this.cbStruct = (uint) Marshal.SizeOf(typeof(WINTRUST_DATA));
|
||||||
@@ -192,11 +192,11 @@ namespace Velopack.Packaging.Windows
|
|||||||
|
|
||||||
Marshal.FreeHGlobal(pInfoStruct);
|
Marshal.FreeHGlobal(pInfoStruct);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ExcludeFromCodeCoverage]
|
[ExcludeFromCodeCoverage]
|
||||||
internal sealed class UnmanagedPointer : IDisposable
|
internal sealed class UnmanagedPointer : IDisposable
|
||||||
{
|
{
|
||||||
IntPtr m_ptr;
|
IntPtr m_ptr;
|
||||||
AllocMethod m_meth;
|
AllocMethod m_meth;
|
||||||
|
|
||||||
@@ -237,6 +237,5 @@ namespace Velopack.Packaging.Windows
|
|||||||
{
|
{
|
||||||
return ptr.m_ptr;
|
return ptr.m_ptr;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ using System.Text.RegularExpressions;
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Velopack.Packaging.Exceptions;
|
using Velopack.Packaging.Exceptions;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Windows
|
namespace Velopack.Packaging.Windows;
|
||||||
|
|
||||||
|
[SupportedOSPlatform("windows")]
|
||||||
|
public class CodeSign
|
||||||
{
|
{
|
||||||
[SupportedOSPlatform("windows")]
|
|
||||||
public class CodeSign
|
|
||||||
{
|
|
||||||
public ILogger Log { get; }
|
public ILogger Log { get; }
|
||||||
|
|
||||||
public CodeSign(ILogger logger)
|
public CodeSign(ILogger logger)
|
||||||
@@ -236,5 +236,4 @@ namespace Velopack.Packaging.Windows
|
|||||||
|
|
||||||
// return new ProcessResult(pi.ExitCode, textResult.Trim());
|
// return new ProcessResult(pi.ExitCode, textResult.Trim());
|
||||||
//}
|
//}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ using Microsoft.Extensions.Logging;
|
|||||||
using NuGet.Versioning;
|
using NuGet.Versioning;
|
||||||
using Velopack.Packaging.Exceptions;
|
using Velopack.Packaging.Exceptions;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Windows
|
namespace Velopack.Packaging.Windows;
|
||||||
|
|
||||||
|
public class DotnetUtil
|
||||||
{
|
{
|
||||||
public class DotnetUtil
|
|
||||||
{
|
|
||||||
public static NuGetVersion VerifyVelopackApp(string exeFile, ILogger log)
|
public static NuGetVersion VerifyVelopackApp(string exeFile, ILogger log)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@@ -148,5 +148,4 @@ namespace Velopack.Packaging.Windows
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Velopack.NuGet;
|
using Velopack.NuGet;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Windows
|
namespace Velopack.Packaging.Windows;
|
||||||
|
|
||||||
|
[SupportedOSPlatform("windows")]
|
||||||
|
public class Rcedit
|
||||||
{
|
{
|
||||||
[SupportedOSPlatform("windows")]
|
|
||||||
public class Rcedit
|
|
||||||
{
|
|
||||||
public static void SetExeIcon(string exePath, string iconPath)
|
public static void SetExeIcon(string exePath, string iconPath)
|
||||||
{
|
{
|
||||||
var args = new[] { Path.GetFullPath(exePath), "--set-icon", iconPath };
|
var args = new[] { Path.GetFullPath(exePath), "--set-icon", iconPath };
|
||||||
@@ -39,5 +39,4 @@ namespace Velopack.Packaging.Windows
|
|||||||
|
|
||||||
Utility.Retry(() => Exe.InvokeAndThrowIfNonZero(HelperFile.RceditPath, args, null));
|
Utility.Retry(() => Exe.InvokeAndThrowIfNonZero(HelperFile.RceditPath, args, null));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Abstractions
|
namespace Velopack.Packaging.Abstractions;
|
||||||
|
|
||||||
|
public interface ICommand<TOpt> where TOpt : class
|
||||||
{
|
{
|
||||||
public interface ICommand<TOpt> where TOpt : class
|
|
||||||
{
|
|
||||||
Task Run(TOpt options);
|
Task Run(TOpt options);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Abstractions
|
namespace Velopack.Packaging.Abstractions;
|
||||||
|
|
||||||
|
public interface IFancyConsole
|
||||||
{
|
{
|
||||||
public interface IFancyConsole
|
|
||||||
{
|
|
||||||
Task ExecuteProgressAsync(Func<IFancyConsoleProgress, Task> action);
|
Task ExecuteProgressAsync(Func<IFancyConsoleProgress, Task> action);
|
||||||
|
|
||||||
void WriteTable(string tableName, IEnumerable<IEnumerable<string>> rows, bool hasHeaderRow = true);
|
void WriteTable(string tableName, IEnumerable<IEnumerable<string>> rows, bool hasHeaderRow = true);
|
||||||
@@ -11,5 +11,4 @@ namespace Velopack.Packaging.Abstractions
|
|||||||
Task<bool> PromptYesNo(string prompt, bool? defaultValue = null, TimeSpan? timeout = null);
|
Task<bool> PromptYesNo(string prompt, bool? defaultValue = null, TimeSpan? timeout = null);
|
||||||
|
|
||||||
void WriteLine(string text = "");
|
void WriteLine(string text = "");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
namespace Velopack.Packaging.Abstractions
|
namespace Velopack.Packaging.Abstractions;
|
||||||
|
|
||||||
|
public interface IFancyConsoleProgress
|
||||||
{
|
{
|
||||||
public interface IFancyConsoleProgress
|
|
||||||
{
|
|
||||||
Task RunTask(string name, Func<Action<int>, Task> fn);
|
Task RunTask(string name, Func<Action<int>, Task> fn);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,9 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Abstractions
|
namespace Velopack.Packaging.Abstractions;
|
||||||
|
|
||||||
|
public interface IOutputOptions
|
||||||
{
|
{
|
||||||
public interface IOutputOptions
|
|
||||||
{
|
|
||||||
DirectoryInfo ReleaseDir { get; }
|
DirectoryInfo ReleaseDir { get; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
namespace Velopack.Packaging.Abstractions
|
namespace Velopack.Packaging.Abstractions;
|
||||||
|
|
||||||
|
public interface IPackOptions : INugetPackCommand, IPlatformOptions
|
||||||
{
|
{
|
||||||
public interface IPackOptions : INugetPackCommand, IPlatformOptions
|
|
||||||
{
|
|
||||||
string Channel { get; }
|
string Channel { get; }
|
||||||
DeltaMode DeltaMode { get; }
|
DeltaMode DeltaMode { get; }
|
||||||
string EntryExecutableName { get; }
|
string EntryExecutableName { get; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,9 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Abstractions
|
namespace Velopack.Packaging.Abstractions;
|
||||||
|
|
||||||
|
public interface IPlatformOptions : IOutputOptions
|
||||||
{
|
{
|
||||||
public interface IPlatformOptions : IOutputOptions
|
|
||||||
{
|
|
||||||
RID TargetRuntime { get; }
|
RID TargetRuntime { get; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using Velopack.Json;
|
using Velopack.Json;
|
||||||
using Velopack.Packaging.Exceptions;
|
using Velopack.Packaging.Exceptions;
|
||||||
|
|
||||||
namespace Velopack.Packaging
|
namespace Velopack.Packaging;
|
||||||
|
|
||||||
|
public class BuildAssets
|
||||||
{
|
{
|
||||||
public class BuildAssets
|
|
||||||
{
|
|
||||||
public List<string> Files { get; set; } = new List<string>();
|
public List<string> Files { get; set; } = new List<string>();
|
||||||
|
|
||||||
public List<VelopackAsset> GetReleaseEntries()
|
public List<VelopackAsset> GetReleaseEntries()
|
||||||
@@ -33,5 +33,4 @@ namespace Velopack.Packaging
|
|||||||
}
|
}
|
||||||
return SimpleJson.DeserializeObject<BuildAssets>(File.ReadAllText(path));
|
return SimpleJson.DeserializeObject<BuildAssets>(File.ReadAllText(path));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Velopack.Packaging.Abstractions;
|
using Velopack.Packaging.Abstractions;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Commands
|
namespace Velopack.Packaging.Commands;
|
||||||
|
|
||||||
|
public class DeltaGenCommandRunner : ICommand<DeltaGenOptions>
|
||||||
{
|
{
|
||||||
public class DeltaGenCommandRunner : ICommand<DeltaGenOptions>
|
|
||||||
{
|
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly IFancyConsole _console;
|
private readonly IFancyConsole _console;
|
||||||
|
|
||||||
@@ -27,5 +27,4 @@ namespace Velopack.Packaging.Commands
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
namespace Velopack.Packaging.Commands
|
namespace Velopack.Packaging.Commands;
|
||||||
|
|
||||||
|
public class DeltaGenOptions
|
||||||
{
|
{
|
||||||
public class DeltaGenOptions
|
|
||||||
{
|
|
||||||
public DeltaMode DeltaMode { get; set; }
|
public DeltaMode DeltaMode { get; set; }
|
||||||
|
|
||||||
public string BasePackage { get; set; }
|
public string BasePackage { get; set; }
|
||||||
@@ -9,5 +9,4 @@
|
|||||||
public string NewPackage { get; set; }
|
public string NewPackage { get; set; }
|
||||||
|
|
||||||
public string OutputFile { get; set; }
|
public string OutputFile { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ using Velopack.Compression;
|
|||||||
using Velopack.Packaging.Exceptions;
|
using Velopack.Packaging.Exceptions;
|
||||||
using Velopack.Packaging.Abstractions;
|
using Velopack.Packaging.Abstractions;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Commands
|
namespace Velopack.Packaging.Commands;
|
||||||
|
|
||||||
|
public class DeltaPatchCommandRunner : ICommand<DeltaPatchOptions>
|
||||||
{
|
{
|
||||||
public class DeltaPatchCommandRunner : ICommand<DeltaPatchOptions>
|
|
||||||
{
|
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly IFancyConsole _console;
|
private readonly IFancyConsole _console;
|
||||||
|
|
||||||
@@ -48,5 +48,4 @@ namespace Velopack.Packaging.Commands
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
namespace Velopack.Packaging.Commands
|
namespace Velopack.Packaging.Commands;
|
||||||
|
|
||||||
|
public class DeltaPatchOptions
|
||||||
{
|
{
|
||||||
public class DeltaPatchOptions
|
|
||||||
{
|
|
||||||
public string BasePackage { get; set; }
|
public string BasePackage { get; set; }
|
||||||
|
|
||||||
public FileInfo[] PatchFiles { get; set; }
|
public FileInfo[] PatchFiles { get; set; }
|
||||||
|
|
||||||
public string OutputFile { get; set; }
|
public string OutputFile { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Velopack.Compression;
|
using Velopack.Compression;
|
||||||
|
|
||||||
namespace Velopack.Packaging
|
namespace Velopack.Packaging;
|
||||||
|
|
||||||
|
public class DeltaEmbedded
|
||||||
{
|
{
|
||||||
public class DeltaEmbedded
|
|
||||||
{
|
|
||||||
private readonly DeltaImpl _delta;
|
private readonly DeltaImpl _delta;
|
||||||
|
|
||||||
public DeltaEmbedded(string zstdPath, ILogger logger, string baseTmpDir)
|
public DeltaEmbedded(string zstdPath, ILogger logger, string baseTmpDir)
|
||||||
@@ -31,5 +31,4 @@ namespace Velopack.Packaging
|
|||||||
_zstd.ApplyPatch(baseFile, patchFile, outputFile);
|
_zstd.ApplyPatch(baseFile, patchFile, outputFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -6,14 +6,14 @@ using System.Runtime.Serialization;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Exceptions
|
namespace Velopack.Packaging.Exceptions;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Denotes that an error has occurred for which a stack trace should not be printed.
|
||||||
|
/// </summary>
|
||||||
|
[ExcludeFromCodeCoverage]
|
||||||
|
public class UserInfoException : Exception
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Denotes that an error has occurred for which a stack trace should not be printed.
|
|
||||||
/// </summary>
|
|
||||||
[ExcludeFromCodeCoverage]
|
|
||||||
public class UserInfoException : Exception
|
|
||||||
{
|
|
||||||
public UserInfoException()
|
public UserInfoException()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -29,5 +29,4 @@ namespace Velopack.Packaging.Exceptions
|
|||||||
protected UserInfoException(SerializationInfo info, StreamingContext context) : base(info, context)
|
protected UserInfoException(SerializationInfo info, StreamingContext context) : base(info, context)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Exceptions
|
namespace Velopack.Packaging.Exceptions;
|
||||||
|
|
||||||
|
[ExcludeFromCodeCoverage]
|
||||||
|
public class VelopackAppVerificationException : UserInfoException
|
||||||
{
|
{
|
||||||
[ExcludeFromCodeCoverage]
|
|
||||||
public class VelopackAppVerificationException : UserInfoException
|
|
||||||
{
|
|
||||||
public VelopackAppVerificationException(string message)
|
public VelopackAppVerificationException(string message)
|
||||||
: base(
|
: base(
|
||||||
$"Failed to verify VelopackApp ({message}). " +
|
$"Failed to verify VelopackApp ({message}). " +
|
||||||
@@ -17,5 +17,4 @@ namespace Velopack.Packaging.Exceptions
|
|||||||
$"and then re-compile/re-publish your application.")
|
$"and then re-compile/re-publish your application.")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Velopack.Packaging.Exceptions;
|
using Velopack.Packaging.Exceptions;
|
||||||
|
|
||||||
namespace Velopack.Packaging
|
namespace Velopack.Packaging;
|
||||||
|
|
||||||
|
public static class Exe
|
||||||
{
|
{
|
||||||
public static class Exe
|
|
||||||
{
|
|
||||||
public static void AssertSystemBinaryExists(string binaryName)
|
public static void AssertSystemBinaryExists(string binaryName)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@@ -80,5 +80,4 @@ namespace Velopack.Packaging
|
|||||||
psi.WorkingDirectory = workingDirectory ?? Environment.CurrentDirectory;
|
psi.WorkingDirectory = workingDirectory ?? Environment.CurrentDirectory;
|
||||||
return psi;
|
return psi;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ using Velopack.NuGet;
|
|||||||
using Velopack.Packaging.Abstractions;
|
using Velopack.Packaging.Abstractions;
|
||||||
using Velopack.Packaging.Exceptions;
|
using Velopack.Packaging.Exceptions;
|
||||||
|
|
||||||
namespace Velopack.Packaging
|
namespace Velopack.Packaging;
|
||||||
{
|
|
||||||
public abstract class PackageBuilder<T> : ICommand<T>
|
public abstract class PackageBuilder<T> : ICommand<T>
|
||||||
where T : class, IPackOptions
|
where T : class, IPackOptions
|
||||||
{
|
{
|
||||||
protected RuntimeOs SupportedTargetOs { get; }
|
protected RuntimeOs SupportedTargetOs { get; }
|
||||||
|
|
||||||
protected ILogger Log { get; }
|
protected ILogger Log { get; }
|
||||||
@@ -334,5 +334,4 @@ namespace Velopack.Packaging
|
|||||||
""";
|
""";
|
||||||
File.WriteAllText(Path.Combine(relsDir, ".rels"), rels);
|
File.WriteAllText(Path.Combine(relsDir, ".rels"), rels);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ using Velopack.Json;
|
|||||||
using Velopack.NuGet;
|
using Velopack.NuGet;
|
||||||
using Velopack.Packaging.Exceptions;
|
using Velopack.Packaging.Exceptions;
|
||||||
|
|
||||||
namespace Velopack.Packaging
|
namespace Velopack.Packaging;
|
||||||
|
|
||||||
|
public class ReleaseEntryHelper
|
||||||
{
|
{
|
||||||
public class ReleaseEntryHelper
|
|
||||||
{
|
|
||||||
private readonly string _outputDir;
|
private readonly string _outputDir;
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly string _channel;
|
private readonly string _channel;
|
||||||
@@ -251,5 +251,4 @@ namespace Velopack.Packaging
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using Velopack.Packaging;
|
using Velopack.Packaging;
|
||||||
|
|
||||||
namespace Velopack.Vpk.Commands
|
namespace Velopack.Vpk.Commands;
|
||||||
|
|
||||||
|
public class DeltaGenCommand : BaseCommand
|
||||||
{
|
{
|
||||||
public class DeltaGenCommand : BaseCommand
|
|
||||||
{
|
|
||||||
public DeltaMode DeltaMode { get; set; }
|
public DeltaMode DeltaMode { get; set; }
|
||||||
|
|
||||||
public string BasePackage { get; set; }
|
public string BasePackage { get; set; }
|
||||||
@@ -39,5 +39,4 @@ namespace Velopack.Vpk.Commands
|
|||||||
.SetArgumentHelpName("PATH")
|
.SetArgumentHelpName("PATH")
|
||||||
.SetRequired();
|
.SetRequired();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
namespace Velopack.Vpk.Commands
|
namespace Velopack.Vpk.Commands;
|
||||||
|
|
||||||
|
public class DeltaPatchCommand : BaseCommand
|
||||||
{
|
{
|
||||||
public class DeltaPatchCommand : BaseCommand
|
|
||||||
{
|
|
||||||
public string BasePackage { get; set; }
|
public string BasePackage { get; set; }
|
||||||
|
|
||||||
public FileInfo[] PatchFiles { get; set; }
|
public FileInfo[] PatchFiles { get; set; }
|
||||||
@@ -29,5 +29,4 @@
|
|||||||
.SetArgumentHelpName("PATH")
|
.SetArgumentHelpName("PATH")
|
||||||
.SetRequired();
|
.SetRequired();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ using Microsoft.NET.HostModel.Bundle;
|
|||||||
using Octokit;
|
using Octokit;
|
||||||
using Velopack.Packaging;
|
using Velopack.Packaging;
|
||||||
|
|
||||||
namespace Velopack.Vpk.Commands
|
namespace Velopack.Vpk.Commands;
|
||||||
|
|
||||||
|
public class LinuxPackCommand : PlatformCommand
|
||||||
{
|
{
|
||||||
public class LinuxPackCommand : PlatformCommand
|
|
||||||
{
|
|
||||||
public string PackId { get; private set; }
|
public string PackId { get; private set; }
|
||||||
|
|
||||||
public string PackVersion { get; private set; }
|
public string PackVersion { get; private set; }
|
||||||
@@ -98,5 +98,4 @@ namespace Velopack.Vpk.Commands
|
|||||||
this.AreMutuallyExclusive(icon, appDir);
|
this.AreMutuallyExclusive(icon, appDir);
|
||||||
this.AtLeastOneRequired(icon, appDir);
|
this.AtLeastOneRequired(icon, appDir);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ using Spectre.Console.Rendering;
|
|||||||
using Velopack.Vpk.Logging;
|
using Velopack.Vpk.Logging;
|
||||||
using static System.CommandLine.Help.HelpBuilder;
|
using static System.CommandLine.Help.HelpBuilder;
|
||||||
|
|
||||||
namespace Velopack.Vpk.Commands
|
namespace Velopack.Vpk.Commands;
|
||||||
|
|
||||||
|
public class LongHelpCommand : CliOption<bool>
|
||||||
{
|
{
|
||||||
public class LongHelpCommand : CliOption<bool>
|
|
||||||
{
|
|
||||||
private CliAction _action;
|
private CliAction _action;
|
||||||
|
|
||||||
public LongHelpCommand() : this("--help", ["-h", "-H", "--vhelp"])
|
public LongHelpCommand() : this("--help", ["-h", "-H", "--vhelp"])
|
||||||
@@ -276,10 +276,10 @@ namespace Velopack.Vpk.Commands
|
|||||||
argument.Arity.MinimumNumberOfValues == 0;
|
argument.Arity.MinimumNumberOfValues == 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class HelpExtensions
|
public static class HelpExtensions
|
||||||
{
|
{
|
||||||
public static bool HasArguments(this CliCommand command) => command.Arguments?.Count > 0;
|
public static bool HasArguments(this CliCommand command) => command.Arguments?.Count > 0;
|
||||||
public static bool HasSubcommands(this CliCommand command) => command.Subcommands?.Count > 0;
|
public static bool HasSubcommands(this CliCommand command) => command.Subcommands?.Count > 0;
|
||||||
public static bool HasOptions(this CliCommand command) => command.Options?.Count > 0;
|
public static bool HasOptions(this CliCommand command) => command.Options?.Count > 0;
|
||||||
@@ -295,5 +295,4 @@ namespace Velopack.Vpk.Commands
|
|||||||
source = next(source);
|
source = next(source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using Velopack.Packaging;
|
using Velopack.Packaging;
|
||||||
|
|
||||||
namespace Velopack.Vpk.Commands
|
namespace Velopack.Vpk.Commands;
|
||||||
|
|
||||||
|
public abstract class OutputCommand : BaseCommand
|
||||||
{
|
{
|
||||||
public abstract class OutputCommand : BaseCommand
|
|
||||||
{
|
|
||||||
public string ReleaseDir { get; private set; }
|
public string ReleaseDir { get; private set; }
|
||||||
|
|
||||||
public string Channel { get; private set; }
|
public string Channel { get; private set; }
|
||||||
@@ -33,5 +33,4 @@ namespace Velopack.Vpk.Commands
|
|||||||
if (!di.Exists) di.Create();
|
if (!di.Exists) di.Create();
|
||||||
return di;
|
return di;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
namespace Velopack.Vpk.Commands
|
namespace Velopack.Vpk.Commands;
|
||||||
|
|
||||||
|
public abstract class PlatformCommand : OutputCommand
|
||||||
{
|
{
|
||||||
public abstract class PlatformCommand : OutputCommand
|
|
||||||
{
|
|
||||||
public string TargetRuntime { get; set; }
|
public string TargetRuntime { get; set; }
|
||||||
|
|
||||||
protected CliOption<string> TargetRuntimeOption { get; private set; }
|
protected CliOption<string> TargetRuntimeOption { get; private set; }
|
||||||
@@ -18,5 +18,4 @@
|
|||||||
public RID GetRid() => RID.Parse(TargetRuntime ?? VelopackRuntimeInfo.SystemOs.GetOsShortName());
|
public RID GetRid() => RID.Parse(TargetRuntime ?? VelopackRuntimeInfo.SystemOs.GetOsShortName());
|
||||||
|
|
||||||
public RuntimeOs GetRuntimeOs() => GetRid().BaseRID;
|
public RuntimeOs GetRuntimeOs() => GetRid().BaseRID;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using Velopack.Packaging.Abstractions;
|
using Velopack.Packaging.Abstractions;
|
||||||
|
|
||||||
namespace Velopack.Vpk.Logging
|
namespace Velopack.Vpk.Logging;
|
||||||
|
|
||||||
|
public class BasicConsole : IFancyConsole
|
||||||
{
|
{
|
||||||
public class BasicConsole : IFancyConsole
|
|
||||||
{
|
|
||||||
private readonly ILogger logger;
|
private readonly ILogger logger;
|
||||||
private readonly DefaultPromptValueFactory defaultFactory;
|
private readonly DefaultPromptValueFactory defaultFactory;
|
||||||
|
|
||||||
@@ -54,5 +54,4 @@ namespace Velopack.Vpk.Logging
|
|||||||
_logger.Info("Complete: " + name);
|
_logger.Info("Complete: " + name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,8 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Velopack.Vpk.Logging
|
namespace Velopack.Vpk.Logging;
|
||||||
|
|
||||||
|
public record DefaultPromptValueFactory(bool DefaultPromptValue)
|
||||||
{
|
{
|
||||||
public record DefaultPromptValueFactory(bool DefaultPromptValue)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ using System.Threading.Tasks;
|
|||||||
using Spectre.Console;
|
using Spectre.Console;
|
||||||
using Velopack.Packaging.Abstractions;
|
using Velopack.Packaging.Abstractions;
|
||||||
|
|
||||||
namespace Velopack.Vpk.Logging
|
namespace Velopack.Vpk.Logging;
|
||||||
|
|
||||||
|
public class SpectreConsole : IFancyConsole
|
||||||
{
|
{
|
||||||
public class SpectreConsole : IFancyConsole
|
|
||||||
{
|
|
||||||
private readonly ILogger logger;
|
private readonly ILogger logger;
|
||||||
private readonly DefaultPromptValueFactory defaultFactory;
|
private readonly DefaultPromptValueFactory defaultFactory;
|
||||||
|
|
||||||
@@ -140,5 +140,4 @@ namespace Velopack.Vpk.Logging
|
|||||||
_logger.Log(LogLevel.Debug, $"[bold]Complete: {name}[/]");
|
_logger.Log(LogLevel.Debug, $"[bold]Complete: {name}[/]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ using Squirrel;
|
|||||||
|
|
||||||
[assembly: AssemblyMetadata("SquirrelAwareVersion", "1")]
|
[assembly: AssemblyMetadata("SquirrelAwareVersion", "1")]
|
||||||
|
|
||||||
namespace LegacyTestApp
|
namespace LegacyTestApp;
|
||||||
|
|
||||||
|
internal class Program
|
||||||
{
|
{
|
||||||
internal class Program
|
|
||||||
{
|
|
||||||
static int Main(string[] args)
|
static int Main(string[] args)
|
||||||
{
|
{
|
||||||
#if CLOWD
|
#if CLOWD
|
||||||
@@ -120,5 +120,4 @@ namespace LegacyTestApp
|
|||||||
var path = Path.Combine(AppContext.BaseDirectory, "..", name);
|
var path = Path.Combine(AppContext.BaseDirectory, "..", name);
|
||||||
File.AppendAllText(path, message + Environment.NewLine);
|
File.AppendAllText(path, message + Environment.NewLine);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace LegacyTestApp
|
namespace LegacyTestApp;
|
||||||
{
|
|
||||||
#if VELOPACK
|
#if VELOPACK
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
class SquirrelLogger : ILogger
|
class SquirrelLogger : ILogger
|
||||||
{
|
{
|
||||||
public IDisposable BeginScope<TState>(TState state) where TState : notnull
|
public IDisposable BeginScope<TState>(TState state) where TState : notnull
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
@@ -20,10 +20,10 @@ namespace LegacyTestApp
|
|||||||
{
|
{
|
||||||
Console.WriteLine(formatter(state, exception));
|
Console.WriteLine(formatter(state, exception));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
class SquirrelLogger : Squirrel.SimpleSplat.ILogger
|
class SquirrelLogger : Squirrel.SimpleSplat.ILogger
|
||||||
{
|
{
|
||||||
protected SquirrelLogger()
|
protected SquirrelLogger()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -39,6 +39,5 @@ namespace LegacyTestApp
|
|||||||
{
|
{
|
||||||
Console.WriteLine(message);
|
Console.WriteLine(message);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ using Velopack.Packaging.Exceptions;
|
|||||||
using Velopack.Packaging.Windows;
|
using Velopack.Packaging.Windows;
|
||||||
using Velopack.Packaging.Windows.Commands;
|
using Velopack.Packaging.Windows.Commands;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Tests
|
namespace Velopack.Packaging.Tests;
|
||||||
|
|
||||||
|
public class DotnetUtilTests
|
||||||
{
|
{
|
||||||
public class DotnetUtilTests
|
|
||||||
{
|
|
||||||
private readonly ITestOutputHelper _output;
|
private readonly ITestOutputHelper _output;
|
||||||
|
|
||||||
public DotnetUtilTests(ITestOutputHelper output)
|
public DotnetUtilTests(ITestOutputHelper output)
|
||||||
@@ -104,5 +104,4 @@ namespace Velopack.Packaging.Tests
|
|||||||
var path = Path.Combine(dir, "TestApp.exe");
|
var path = Path.Combine(dir, "TestApp.exe");
|
||||||
Assert.Throws<UserInfoException>(() => DotnetUtil.VerifyVelopackApp(path, logger));
|
Assert.Throws<UserInfoException>(() => DotnetUtil.VerifyVelopackApp(path, logger));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ using Velopack.Sources;
|
|||||||
using Octokit;
|
using Octokit;
|
||||||
using Velopack.Packaging.Exceptions;
|
using Velopack.Packaging.Exceptions;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Tests
|
namespace Velopack.Packaging.Tests;
|
||||||
|
|
||||||
|
public class GithubDeploymentTests
|
||||||
{
|
{
|
||||||
public class GithubDeploymentTests
|
|
||||||
{
|
|
||||||
public readonly static string GITHUB_TOKEN = Environment.GetEnvironmentVariable("VELOPACK_GITHUB_TEST_TOKEN");
|
public readonly static string GITHUB_TOKEN = Environment.GetEnvironmentVariable("VELOPACK_GITHUB_TEST_TOKEN");
|
||||||
public readonly static string GITHUB_REPOURL = "https://github.com/caesay/VelopackGithubUpdateTest";
|
public readonly static string GITHUB_REPOURL = "https://github.com/caesay/VelopackGithubUpdateTest";
|
||||||
|
|
||||||
@@ -233,5 +233,4 @@ This is just a _test_!
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,15 +2,14 @@
|
|||||||
|
|
||||||
[assembly: TestFramework("Velopack.Packaging.Tests.TestsInit", "Velopack.Packaging.Tests")]
|
[assembly: TestFramework("Velopack.Packaging.Tests.TestsInit", "Velopack.Packaging.Tests")]
|
||||||
|
|
||||||
namespace Velopack.Packaging.Tests
|
namespace Velopack.Packaging.Tests;
|
||||||
|
|
||||||
|
public class TestsInit : XunitTestFramework
|
||||||
{
|
{
|
||||||
public class TestsInit : XunitTestFramework
|
|
||||||
{
|
|
||||||
public TestsInit(IMessageSink messageSink)
|
public TestsInit(IMessageSink messageSink)
|
||||||
: base(messageSink)
|
: base(messageSink)
|
||||||
{
|
{
|
||||||
HelperFile.AddSearchPath(PathHelper.GetRustBuildOutputDir());
|
HelperFile.AddSearchPath(PathHelper.GetRustBuildOutputDir());
|
||||||
HelperFile.AddSearchPath(PathHelper.GetVendorLibDir());
|
HelperFile.AddSearchPath(PathHelper.GetVendorLibDir());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ using Velopack.Deployment;
|
|||||||
using Velopack.Packaging.Exceptions;
|
using Velopack.Packaging.Exceptions;
|
||||||
using Velopack.Sources;
|
using Velopack.Sources;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Tests
|
namespace Velopack.Packaging.Tests;
|
||||||
|
|
||||||
|
public class S3DeploymentTests
|
||||||
{
|
{
|
||||||
public class S3DeploymentTests
|
|
||||||
{
|
|
||||||
public readonly static string B2_KEYID = "0035016844a4188000000000a";
|
public readonly static string B2_KEYID = "0035016844a4188000000000a";
|
||||||
public readonly static string B2_SECRET = Environment.GetEnvironmentVariable("VELOPACK_B2_TEST_TOKEN");
|
public readonly static string B2_SECRET = Environment.GetEnvironmentVariable("VELOPACK_B2_TEST_TOKEN");
|
||||||
public readonly static string B2_BUCKET = "velopack-testing";
|
public readonly static string B2_BUCKET = "velopack-testing";
|
||||||
@@ -83,5 +83,4 @@ namespace Velopack.Packaging.Tests
|
|||||||
Assert.Equal(newVer, latest.Version);
|
Assert.Equal(newVer, latest.Version);
|
||||||
Assert.True(feed.Assets.Count(x => x.Type == VelopackAssetType.Full) <= options.KeepMaxReleases, "Too many releases were kept.");
|
Assert.True(feed.Assets.Count(x => x.Type == VelopackAssetType.Full) <= options.KeepMaxReleases, "Too many releases were kept.");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ using Velopack.Packaging.Unix.Commands;
|
|||||||
using Velopack.Packaging.Windows.Commands;
|
using Velopack.Packaging.Windows.Commands;
|
||||||
using Velopack.Vpk.Logging;
|
using Velopack.Vpk.Logging;
|
||||||
|
|
||||||
namespace Velopack.Packaging.Tests
|
namespace Velopack.Packaging.Tests;
|
||||||
|
|
||||||
|
public static class TestApp
|
||||||
{
|
{
|
||||||
public static class TestApp
|
|
||||||
{
|
|
||||||
public static void PackTestApp(string id, string version, string testString, string releaseDir, ILogger logger,
|
public static void PackTestApp(string id, string version, string testString, string releaseDir, ILogger logger,
|
||||||
string releaseNotes = null, string channel = null)
|
string releaseNotes = null, string channel = null)
|
||||||
{
|
{
|
||||||
@@ -86,5 +86,4 @@ namespace Velopack.Packaging.Tests
|
|||||||
File.WriteAllText(testStringFile, oldText);
|
File.WriteAllText(testStringFile, oldText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace Velopack.Tests.OldSquirrel
|
namespace Velopack.Tests.OldSquirrel;
|
||||||
|
|
||||||
|
[DataContract]
|
||||||
|
public class ReleaseEntry
|
||||||
{
|
{
|
||||||
[DataContract]
|
|
||||||
public class ReleaseEntry
|
|
||||||
{
|
|
||||||
[DataMember] public string SHA1 { get; protected set; }
|
[DataMember] public string SHA1 { get; protected set; }
|
||||||
[DataMember] public string BaseUrl { get; protected set; }
|
[DataMember] public string BaseUrl { get; protected set; }
|
||||||
[DataMember] public string Filename { get; protected set; }
|
[DataMember] public string Filename { get; protected set; }
|
||||||
@@ -275,5 +275,4 @@ namespace Velopack.Tests.OldSquirrel
|
|||||||
// .Select(x => new ReleasePackage(Path.Combine(targetDir, x.Filename), true))
|
// .Select(x => new ReleasePackage(Path.Combine(targetDir, x.Filename), true))
|
||||||
// .FirstOrDefault();
|
// .FirstOrDefault();
|
||||||
//}
|
//}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace Velopack.Tests.OldSquirrel
|
namespace Velopack.Tests.OldSquirrel;
|
||||||
|
|
||||||
|
public static class VersionExtensions
|
||||||
{
|
{
|
||||||
public static class VersionExtensions
|
|
||||||
{
|
|
||||||
static readonly Regex _suffixRegex = new Regex(@"(-full|-delta)?\.nupkg$", RegexOptions.Compiled);
|
static readonly Regex _suffixRegex = new Regex(@"(-full|-delta)?\.nupkg$", RegexOptions.Compiled);
|
||||||
static readonly Regex _versionRegex = new Regex(@"\d+(\.\d+){0,3}(-[A-Za-z][0-9A-Za-z-]*)?$", RegexOptions.Compiled);
|
static readonly Regex _versionRegex = new Regex(@"\d+(\.\d+){0,3}(-[A-Za-z][0-9A-Za-z-]*)?$", RegexOptions.Compiled);
|
||||||
|
|
||||||
@@ -18,5 +18,4 @@ namespace Velopack.Tests.OldSquirrel
|
|||||||
var version = _versionRegex.Match(name).Value;
|
var version = _versionRegex.Match(name).Value;
|
||||||
return new SemanticVersion(version);
|
return new SemanticVersion(version);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace Velopack.Tests.OldSquirrel
|
namespace Velopack.Tests.OldSquirrel;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A hybrid implementation of SemVer that supports semantic versioning as described at http://semver.org while not strictly enforcing it to
|
||||||
|
/// allow older 4-digit versioning schemes to continue working.
|
||||||
|
/// </summary>
|
||||||
|
[Serializable]
|
||||||
|
public sealed class SemanticVersion : IComparable, IComparable<SemanticVersion>, IEquatable<SemanticVersion>
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// A hybrid implementation of SemVer that supports semantic versioning as described at http://semver.org while not strictly enforcing it to
|
|
||||||
/// allow older 4-digit versioning schemes to continue working.
|
|
||||||
/// </summary>
|
|
||||||
[Serializable]
|
|
||||||
public sealed class SemanticVersion : IComparable, IComparable<SemanticVersion>, IEquatable<SemanticVersion>
|
|
||||||
{
|
|
||||||
private const RegexOptions _flags = RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture;
|
private const RegexOptions _flags = RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture;
|
||||||
private static readonly Regex _semanticVersionRegex = new Regex(@"^(?<Version>\d+(\s*\.\s*\d+){0,3})(?<Release>-[a-z][0-9a-z-]*)?$", _flags);
|
private static readonly Regex _semanticVersionRegex = new Regex(@"^(?<Version>\d+(\s*\.\s*\d+){0,3})(?<Release>-[a-z][0-9a-z-]*)?$", _flags);
|
||||||
private static readonly Regex _strictSemanticVersionRegex = new Regex(@"^(?<Version>\d+(\.\d+){2})(?<Release>-[a-z][0-9a-z-]*)?$", _flags);
|
private static readonly Regex _strictSemanticVersionRegex = new Regex(@"^(?<Version>\d+(\.\d+){2})(?<Release>-[a-z][0-9a-z-]*)?$", _flags);
|
||||||
@@ -298,5 +298,4 @@ namespace Velopack.Tests.OldSquirrel
|
|||||||
|
|
||||||
return hashCode;
|
return hashCode;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
namespace Velopack.Tests.OldSquirrel
|
namespace Velopack.Tests.OldSquirrel;
|
||||||
|
|
||||||
|
internal static class Utility
|
||||||
{
|
{
|
||||||
internal static class Utility
|
|
||||||
{
|
|
||||||
public static bool IsHttpUrl(string urlOrPath)
|
public static bool IsHttpUrl(string urlOrPath)
|
||||||
{
|
{
|
||||||
var uri = default(Uri);
|
var uri = default(Uri);
|
||||||
@@ -11,5 +11,4 @@
|
|||||||
|
|
||||||
return uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps;
|
return uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ using NuGet.Versioning;
|
|||||||
using OldReleaseEntry = Velopack.Tests.OldSquirrel.ReleaseEntry;
|
using OldReleaseEntry = Velopack.Tests.OldSquirrel.ReleaseEntry;
|
||||||
using OldSemanticVersion = Velopack.Tests.OldSquirrel.SemanticVersion;
|
using OldSemanticVersion = Velopack.Tests.OldSquirrel.SemanticVersion;
|
||||||
|
|
||||||
namespace Velopack.Tests
|
namespace Velopack.Tests;
|
||||||
|
|
||||||
|
public class ReleaseEntryTests
|
||||||
{
|
{
|
||||||
public class ReleaseEntryTests
|
|
||||||
{
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData(@"MyCoolApp-1.0-full.nupkg", "MyCoolApp", "1.0", "")]
|
[InlineData(@"MyCoolApp-1.0-full.nupkg", "MyCoolApp", "1.0", "")]
|
||||||
[InlineData(@"MyCoolApp-1.0.0-full.nupkg", "MyCoolApp", "1.0.0", "")]
|
[InlineData(@"MyCoolApp-1.0.0-full.nupkg", "MyCoolApp", "1.0.0", "")]
|
||||||
@@ -505,5 +505,4 @@ namespace Velopack.Tests
|
|||||||
return String.Format("94689fede03fed7ab59c24337673a27837f0c3ec {0} 1004502", name);
|
return String.Format("94689fede03fed7ab59c24337673a27837f0c3ec {0} 1004502", name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Velopack.Tests
|
namespace Velopack.Tests;
|
||||||
|
|
||||||
|
public class RuntimeInfoTests
|
||||||
{
|
{
|
||||||
public class RuntimeInfoTests
|
|
||||||
{
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void NugetVersionAgreesWithNbgv()
|
public void NugetVersionAgreesWithNbgv()
|
||||||
{
|
{
|
||||||
@@ -41,5 +41,4 @@ namespace Velopack.Tests
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using Velopack.Windows;
|
using Velopack.Windows;
|
||||||
|
|
||||||
namespace Velopack.Tests
|
namespace Velopack.Tests;
|
||||||
|
|
||||||
|
public class RuntimeTests
|
||||||
{
|
{
|
||||||
public class RuntimeTests
|
|
||||||
{
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("net6", "net6-x64-desktop")]
|
[InlineData("net6", "net6-x64-desktop")]
|
||||||
[InlineData("net6.0", "net6-x64-desktop")]
|
[InlineData("net6.0", "net6-x64-desktop")]
|
||||||
@@ -104,5 +104,4 @@ namespace Velopack.Tests
|
|||||||
var result = await hc.GetAsync(url, HttpCompletionOption.ResponseHeadersRead);
|
var result = await hc.GetAsync(url, HttpCompletionOption.ResponseHeadersRead);
|
||||||
result.EnsureSuccessStatusCode();
|
result.EnsureSuccessStatusCode();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -8,11 +8,11 @@ using System.Threading.Tasks;
|
|||||||
using Velopack.Locators;
|
using Velopack.Locators;
|
||||||
using Velopack.Windows;
|
using Velopack.Windows;
|
||||||
|
|
||||||
namespace Velopack.Tests
|
namespace Velopack.Tests;
|
||||||
|
|
||||||
|
[SupportedOSPlatform("windows")]
|
||||||
|
public class ShortcutTests
|
||||||
{
|
{
|
||||||
[SupportedOSPlatform("windows")]
|
|
||||||
public class ShortcutTests
|
|
||||||
{
|
|
||||||
private readonly ITestOutputHelper _output;
|
private readonly ITestOutputHelper _output;
|
||||||
|
|
||||||
public ShortcutTests(ITestOutputHelper output)
|
public ShortcutTests(ITestOutputHelper output)
|
||||||
@@ -59,5 +59,4 @@ namespace Velopack.Tests
|
|||||||
var after = sh.FindShortcuts(exeName, flag);
|
var after = sh.FindShortcuts(exeName, flag);
|
||||||
Assert.Equal(0, after.Keys.Count);
|
Assert.Equal(0, after.Keys.Count);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ using SimpleJsonNameAttribute = System.Text.Json.Serialization.JsonPropertyNameA
|
|||||||
using SimpleJsonNameAttribute = Velopack.Json.JsonPropertyNameAttribute;
|
using SimpleJsonNameAttribute = Velopack.Json.JsonPropertyNameAttribute;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Velopack.Tests
|
namespace Velopack.Tests;
|
||||||
|
|
||||||
|
public class SimpleJsonTests
|
||||||
{
|
{
|
||||||
public class SimpleJsonTests
|
|
||||||
{
|
|
||||||
public static readonly JsonSerializerOptions Options = new JsonSerializerOptions {
|
public static readonly JsonSerializerOptions Options = new JsonSerializerOptions {
|
||||||
AllowTrailingCommas = true,
|
AllowTrailingCommas = true,
|
||||||
ReadCommentHandling = JsonCommentHandling.Skip,
|
ReadCommentHandling = JsonCommentHandling.Skip,
|
||||||
@@ -147,5 +147,4 @@ namespace Velopack.Tests
|
|||||||
|
|
||||||
public List<string> greetings { get; set; }
|
public List<string> greetings { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Velopack.Tests.TestHelpers
|
namespace Velopack.Tests.TestHelpers;
|
||||||
|
|
||||||
|
public static class AssertExtensions
|
||||||
{
|
{
|
||||||
public static class AssertExtensions
|
|
||||||
{
|
|
||||||
public static void ShouldBeAboutEqualTo(this DateTimeOffset expected, DateTimeOffset current)
|
public static void ShouldBeAboutEqualTo(this DateTimeOffset expected, DateTimeOffset current)
|
||||||
{
|
{
|
||||||
Assert.Equal(expected.Date, current.Date);
|
Assert.Equal(expected.Date, current.Date);
|
||||||
@@ -137,11 +137,10 @@ namespace Velopack.Tests.TestHelpers
|
|||||||
}
|
}
|
||||||
return c.ToString(CultureInfo.InvariantCulture);
|
return c.ToString(CultureInfo.InvariantCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum DiffStyle
|
public enum DiffStyle
|
||||||
{
|
{
|
||||||
Full,
|
Full,
|
||||||
Minimal
|
Minimal
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ using System.Reflection;
|
|||||||
|
|
||||||
// Lovingly stolen from http://exposedobject.codeplex.com/
|
// Lovingly stolen from http://exposedobject.codeplex.com/
|
||||||
|
|
||||||
namespace Velopack.Tests.TestHelpers
|
namespace Velopack.Tests.TestHelpers;
|
||||||
|
|
||||||
|
public class ExposedClass : DynamicObject
|
||||||
{
|
{
|
||||||
public class ExposedClass : DynamicObject
|
|
||||||
{
|
|
||||||
private Type m_type;
|
private Type m_type;
|
||||||
private Dictionary<string, Dictionary<int, List<MethodInfo>>> m_staticMethods;
|
private Dictionary<string, Dictionary<int, List<MethodInfo>>> m_staticMethods;
|
||||||
private Dictionary<string, Dictionary<int, List<MethodInfo>>> m_genStaticMethods;
|
private Dictionary<string, Dictionary<int, List<MethodInfo>>> m_genStaticMethods;
|
||||||
@@ -134,5 +134,4 @@ namespace Velopack.Tests.TestHelpers
|
|||||||
{
|
{
|
||||||
return new ExposedClass(type);
|
return new ExposedClass(type);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ using System.Reflection;
|
|||||||
|
|
||||||
// Lovingly stolen from http://exposedobject.codeplex.com/
|
// Lovingly stolen from http://exposedobject.codeplex.com/
|
||||||
|
|
||||||
namespace Velopack.Tests.TestHelpers
|
namespace Velopack.Tests.TestHelpers;
|
||||||
|
|
||||||
|
public class ExposedObject : DynamicObject
|
||||||
{
|
{
|
||||||
public class ExposedObject : DynamicObject
|
|
||||||
{
|
|
||||||
private object m_object;
|
private object m_object;
|
||||||
private Type m_type;
|
private Type m_type;
|
||||||
private Dictionary<string, Dictionary<int, List<MethodInfo>>> m_instanceMethods;
|
private Dictionary<string, Dictionary<int, List<MethodInfo>>> m_instanceMethods;
|
||||||
@@ -165,6 +165,4 @@ namespace Velopack.Tests.TestHelpers
|
|||||||
result = m_object;
|
result = m_object;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ using System.Dynamic;
|
|||||||
|
|
||||||
// Lovingly stolen from http://exposedobject.codeplex.com/
|
// Lovingly stolen from http://exposedobject.codeplex.com/
|
||||||
|
|
||||||
namespace Velopack.Tests.TestHelpers
|
namespace Velopack.Tests.TestHelpers;
|
||||||
|
|
||||||
|
internal class ExposedObjectHelper
|
||||||
{
|
{
|
||||||
internal class ExposedObjectHelper
|
|
||||||
{
|
|
||||||
private static Type s_csharpInvokePropertyType =
|
private static Type s_csharpInvokePropertyType =
|
||||||
typeof(Microsoft.CSharp.RuntimeBinder.RuntimeBinderException)
|
typeof(Microsoft.CSharp.RuntimeBinder.RuntimeBinderException)
|
||||||
.Assembly
|
.Assembly
|
||||||
@@ -90,5 +90,4 @@ namespace Velopack.Tests.TestHelpers
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Velopack.Tests
|
namespace Velopack.Tests;
|
||||||
|
|
||||||
|
public class FakeDownloader : Sources.IFileDownloader
|
||||||
{
|
{
|
||||||
public class FakeDownloader : Sources.IFileDownloader
|
|
||||||
{
|
|
||||||
public string LastUrl { get; private set; }
|
public string LastUrl { get; private set; }
|
||||||
public string LastLocalFile { get; private set; }
|
public string LastLocalFile { get; private set; }
|
||||||
public string LastAuthHeader { get; private set; }
|
public string LastAuthHeader { get; private set; }
|
||||||
@@ -35,5 +35,4 @@ namespace Velopack.Tests
|
|||||||
{
|
{
|
||||||
return Encoding.UTF8.GetString(await DownloadBytes(url, auth, acc));
|
return Encoding.UTF8.GetString(await DownloadBytes(url, auth, acc));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ using System.Text;
|
|||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Velopack.Sources;
|
using Velopack.Sources;
|
||||||
|
|
||||||
namespace Velopack.Tests.TestHelpers
|
namespace Velopack.Tests.TestHelpers;
|
||||||
|
|
||||||
|
internal class FakeFixtureRepository : Sources.IFileDownloader
|
||||||
{
|
{
|
||||||
internal class FakeFixtureRepository : Sources.IFileDownloader
|
|
||||||
{
|
|
||||||
private readonly string _pkgId;
|
private readonly string _pkgId;
|
||||||
private readonly IEnumerable<ReleaseEntry> _releases;
|
private readonly IEnumerable<ReleaseEntry> _releases;
|
||||||
private readonly VelopackAssetFeed _releasesNew;
|
private readonly VelopackAssetFeed _releasesNew;
|
||||||
@@ -110,5 +110,4 @@ namespace Velopack.Tests.TestHelpers
|
|||||||
|
|
||||||
throw new NotSupportedException("FakeFixtureRepository doesn't have: " + url);
|
throw new NotSupportedException("FakeFixtureRepository doesn't have: " + url);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Velopack.Tests
|
namespace Velopack.Tests;
|
||||||
|
|
||||||
|
public sealed class StaticHttpServer : IDisposable
|
||||||
{
|
{
|
||||||
public sealed class StaticHttpServer : IDisposable
|
|
||||||
{
|
|
||||||
public int Port { get; private set; }
|
public int Port { get; private set; }
|
||||||
public string RootPath { get; private set; }
|
public string RootPath { get; private set; }
|
||||||
|
|
||||||
@@ -88,5 +88,4 @@ namespace Velopack.Tests
|
|||||||
toDispose.Dispose();
|
toDispose.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ using Velopack.Locators;
|
|||||||
using Velopack.Sources;
|
using Velopack.Sources;
|
||||||
using Velopack.Tests.TestHelpers;
|
using Velopack.Tests.TestHelpers;
|
||||||
|
|
||||||
namespace Velopack.Tests
|
namespace Velopack.Tests;
|
||||||
|
|
||||||
|
public class UpdateManagerTests
|
||||||
{
|
{
|
||||||
public class UpdateManagerTests
|
|
||||||
{
|
|
||||||
private readonly ITestOutputHelper _output;
|
private readonly ITestOutputHelper _output;
|
||||||
|
|
||||||
public UpdateManagerTests(ITestOutputHelper output)
|
public UpdateManagerTests(ITestOutputHelper output)
|
||||||
@@ -380,5 +380,4 @@ namespace Velopack.Tests
|
|||||||
var target = Path.Combine(packagesDir, $"{id}-{toVersion}-full.nupkg");
|
var target = Path.Combine(packagesDir, $"{id}-{toVersion}-full.nupkg");
|
||||||
Assert.True(File.Exists(target));
|
Assert.True(File.Exists(target));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ using System.Security.Cryptography;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Velopack.Windows;
|
using Velopack.Windows;
|
||||||
|
|
||||||
namespace Velopack.Tests
|
namespace Velopack.Tests;
|
||||||
|
|
||||||
|
public class UtilityTests
|
||||||
{
|
{
|
||||||
public class UtilityTests
|
|
||||||
{
|
|
||||||
private readonly ITestOutputHelper _output;
|
private readonly ITestOutputHelper _output;
|
||||||
|
|
||||||
public UtilityTests(ITestOutputHelper output)
|
public UtilityTests(ITestOutputHelper output)
|
||||||
@@ -234,5 +234,4 @@ namespace Velopack.Tests
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ using Velopack.NuGet;
|
|||||||
using Velopack.Tests.TestHelpers;
|
using Velopack.Tests.TestHelpers;
|
||||||
using ZipPackage = Velopack.NuGet.ZipPackage;
|
using ZipPackage = Velopack.NuGet.ZipPackage;
|
||||||
|
|
||||||
namespace Velopack.Tests
|
namespace Velopack.Tests;
|
||||||
|
|
||||||
|
public class ZipPackageTests
|
||||||
{
|
{
|
||||||
public class ZipPackageTests
|
|
||||||
{
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void HasSameFilesAndDependenciesAsPackaging()
|
public void HasSameFilesAndDependenciesAsPackaging()
|
||||||
{
|
{
|
||||||
@@ -84,5 +84,4 @@ namespace Velopack.Tests
|
|||||||
{
|
{
|
||||||
return Path.GetExtension(p).Equals(NugetUtil.ManifestExtension, StringComparison.OrdinalIgnoreCase);
|
return Path.GetExtension(p).Equals(NugetUtil.ManifestExtension, StringComparison.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user