From a82aa422dbc1ecdb7d0fd09ce6ef94535aec5e30 Mon Sep 17 00:00:00 2001 From: Cam Date: Mon, 24 Jun 2024 12:04:45 +1000 Subject: [PATCH 01/12] Move away from defaulting to windows, create OS X support --- .../Kangaroo/Queries/NetworkQuerierFactory.cs | 45 ++++++++++++------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/source/Kangaroo/Queries/NetworkQuerierFactory.cs b/source/Kangaroo/Queries/NetworkQuerierFactory.cs index cac4764..283a981 100644 --- a/source/Kangaroo/Queries/NetworkQuerierFactory.cs +++ b/source/Kangaroo/Queries/NetworkQuerierFactory.cs @@ -20,22 +20,33 @@ public NetworkQuerierFactory(ILogger logger, IQueryPingResults ping, Func public IQueryNetworkNode CreateQuerier() { - return RuntimeInformation.IsOSPlatform(OSPlatform.Linux) - ? new QueryNetworkNode( - logger: _logger, - ping: _ping, - mac: new LinuxQueryMacAddress(_logger), - host: new QueryHostname(_logger), - http: _clientFactory != null - ? new QueryWebServer(_logger, _clientFactory) - : null) - : new QueryNetworkNode( - logger: _logger, - ping: _ping, - mac: new WindowsQueryMacAddress(_logger), - host: new QueryHostname(_logger), - http: _clientFactory != null - ? new QueryWebServer(_logger, _clientFactory) - : null); + + // Linux || Mac + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + return new QueryNetworkNode( + logger: _logger, + ping: _ping, + mac: new LinuxQueryMacAddress(_logger), + host: new QueryHostname(_logger), + http: _clientFactory != null + ? new QueryWebServer(_logger, _clientFactory) + : null); + } + + // Windows + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + return new QueryNetworkNode( + logger: _logger, + ping: _ping, + mac: new WindowsQueryMacAddress(_logger), + host: new QueryHostname(_logger), + http: _clientFactory != null + ? new QueryWebServer(_logger, _clientFactory) + : null); + } + + throw new PlatformNotSupportedException(); } } \ No newline at end of file From d5dd310671ecaf00ceb18df2372c46548e5ab963 Mon Sep 17 00:00:00 2001 From: Eric Williams <53901011+ewilliams0305@users.noreply.github.com> Date: Fri, 12 Jul 2024 07:36:23 -0400 Subject: [PATCH 02/12] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 3dad75e..5c5277f 100644 --- a/README.md +++ b/README.md @@ -233,3 +233,9 @@ Individual nodes can be queried as well. var node = await scanner.CheckNetworkNode(); Console.WriteLine(node.Dump()); ``` + +# Contributing + + + + From f482c2c15796e9ca1d99764d1ef20ce1b2c4dbda Mon Sep 17 00:00:00 2001 From: Eric Williams Date: Mon, 15 Jul 2024 10:34:11 -0400 Subject: [PATCH 03/12] added multiple targets to the core library --- .../Kangaroo.UI.Desktop.csproj | 1 - source/Kangaroo.UI/Kangaroo.UI.csproj | 1 - source/Kangaroo.sln | 1 + .../Kangaroo/Builder/Options/QueryOptions.cs | 4 +-- source/Kangaroo/CompilerService.cs | 8 ++++++ source/Kangaroo/Kangaroo.csproj | 4 +-- source/Kangaroo/Model/MacAddress.cs | 26 +++++++++++++++++-- source/Kangaroo/Platforms/LinuxCommand.cs | 7 +++++ source/Kangaroo/Platforms/WindowsCommand.cs | 5 ++++ source/Kangaroo/Queries/QueryHostname.cs | 5 ++++ 10 files changed, 53 insertions(+), 9 deletions(-) create mode 100644 source/Kangaroo/CompilerService.cs diff --git a/source/Kangaroo.UI.Desktop/Kangaroo.UI.Desktop.csproj b/source/Kangaroo.UI.Desktop/Kangaroo.UI.Desktop.csproj index d1611c5..d9c83ed 100644 --- a/source/Kangaroo.UI.Desktop/Kangaroo.UI.Desktop.csproj +++ b/source/Kangaroo.UI.Desktop/Kangaroo.UI.Desktop.csproj @@ -4,7 +4,6 @@ net8.0 - 0.2.1 enable true app.manifest diff --git a/source/Kangaroo.UI/Kangaroo.UI.csproj b/source/Kangaroo.UI/Kangaroo.UI.csproj index 4105af9..c445df9 100644 --- a/source/Kangaroo.UI/Kangaroo.UI.csproj +++ b/source/Kangaroo.UI/Kangaroo.UI.csproj @@ -2,7 +2,6 @@ net8.0 enable - 0.2.1 latest true diff --git a/source/Kangaroo.sln b/source/Kangaroo.sln index 256960c..4028959 100644 --- a/source/Kangaroo.sln +++ b/source/Kangaroo.sln @@ -9,6 +9,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Kangaroo", "Kangaroo\Kangar EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{657FBE6A-5E1B-4E5B-93C6-DB4CC457ABC5}" ProjectSection(SolutionItems) = preProject + Directory.Build.props = Directory.Build.props ..\.github\workflows\library.yaml = ..\.github\workflows\library.yaml ..\.github\workflows\nuget.yaml = ..\.github\workflows\nuget.yaml ..\README.md = ..\README.md diff --git a/source/Kangaroo/Builder/Options/QueryOptions.cs b/source/Kangaroo/Builder/Options/QueryOptions.cs index a578cbe..5662f9b 100644 --- a/source/Kangaroo/Builder/Options/QueryOptions.cs +++ b/source/Kangaroo/Builder/Options/QueryOptions.cs @@ -1,6 +1,4 @@ -using System.Security.AccessControl; - -namespace Kangaroo; +namespace Kangaroo; /// /// Options used for network queries diff --git a/source/Kangaroo/CompilerService.cs b/source/Kangaroo/CompilerService.cs new file mode 100644 index 0000000..e3a6e0f --- /dev/null +++ b/source/Kangaroo/CompilerService.cs @@ -0,0 +1,8 @@ +// ReSharper disable once CheckNamespace +namespace System.Runtime.CompilerServices +{ + /// + /// Tricks the compiler to allow source generated code in lower level C# versions. + /// + public class IsExternalInit { } +} \ No newline at end of file diff --git a/source/Kangaroo/Kangaroo.csproj b/source/Kangaroo/Kangaroo.csproj index 2aacfd2..d94cc8f 100644 --- a/source/Kangaroo/Kangaroo.csproj +++ b/source/Kangaroo/Kangaroo.csproj @@ -1,14 +1,14 @@  - net6.0 + netstandard2.0;netstandard2.1;net6.0;net8.0 enable enable + 12 True True Kangaroo network scanner - 0.2.1 The kangaroo scanner is a network scanner designed to operate within a C# dotnet application. The kangaroo scanner allows you to query network endpoints and operate common tasks against them. https://github.com/ewilliams0305/kangaroo kangaroo-logo.png diff --git a/source/Kangaroo/Model/MacAddress.cs b/source/Kangaroo/Model/MacAddress.cs index e76b927..c6d6718 100644 --- a/source/Kangaroo/Model/MacAddress.cs +++ b/source/Kangaroo/Model/MacAddress.cs @@ -1,4 +1,5 @@ -using System.Text; +using System.Globalization; +using System.Text; namespace Kangaroo; @@ -79,8 +80,11 @@ public MacAddress(string macAddress) throw new ArgumentOutOfRangeException(nameof(macAddress)); } +#if NET6_0_OR_GREATER var bytes = Convert.FromHexString(macAddress.Replace(ColonString, "")); - +#else + var bytes = FromHexString(macAddress.Replace(ColonString, "")); +#endif if (bytes.Length != 6) { throw new ArgumentOutOfRangeException(nameof(macAddress)); @@ -168,4 +172,22 @@ public override int GetHashCode() /// public static implicit operator byte[](MacAddress macAddress) => macAddress._bytes; +#if NETSTANDARD + private static byte[] FromHexString(string hex) + { + if (hex.Length % 2 != 0) + { + throw new ArgumentException("Invalid length of the hex string."); + } + + var bytes = new byte[hex.Length / 2]; + for (int i = 0; i < hex.Length; i += 2) + { + bytes[i / 2] = byte.Parse(hex.Substring(i, 2), NumberStyles.HexNumber); + } + + return bytes; + } +#endif + } \ No newline at end of file diff --git a/source/Kangaroo/Platforms/LinuxCommand.cs b/source/Kangaroo/Platforms/LinuxCommand.cs index 690aded..1fcc003 100644 --- a/source/Kangaroo/Platforms/LinuxCommand.cs +++ b/source/Kangaroo/Platforms/LinuxCommand.cs @@ -1,4 +1,5 @@ using System.Diagnostics; +using System.Net.Mail; namespace Kangaroo.Platforms; @@ -19,7 +20,13 @@ public static async Task RunCommandAsync(string command, CancellationTok process.Start(); var result = await process.StandardOutput.ReadToEndAsync(); + +#if NET6_0_OR_GREATER await process.WaitForExitAsync(token); return result; +#else + process.WaitForExit(); + return result; +#endif } } \ No newline at end of file diff --git a/source/Kangaroo/Platforms/WindowsCommand.cs b/source/Kangaroo/Platforms/WindowsCommand.cs index 2be45cc..ba283b4 100644 --- a/source/Kangaroo/Platforms/WindowsCommand.cs +++ b/source/Kangaroo/Platforms/WindowsCommand.cs @@ -19,7 +19,12 @@ public static async Task RunCommandAsync(string command, CancellationTok process.Start(); var result = await process.StandardOutput.ReadToEndAsync(); +#if NET6_0_OR_GREATER await process.WaitForExitAsync(token); return result; +#else + process.WaitForExit(); + return result; +#endif } } \ No newline at end of file diff --git a/source/Kangaroo/Queries/QueryHostname.cs b/source/Kangaroo/Queries/QueryHostname.cs index 8060098..12755a3 100644 --- a/source/Kangaroo/Queries/QueryHostname.cs +++ b/source/Kangaroo/Queries/QueryHostname.cs @@ -1,4 +1,5 @@ using Microsoft.Extensions.Logging; +using System.Diagnostics; using System.Net; using System.Net.Sockets; @@ -18,7 +19,11 @@ internal QueryHostname(ILogger logger) { try { +#if NET6_0_OR_GREATER var ipHostEntry = await Dns.GetHostEntryAsync(ipAddress.ToString(), AddressFamily.NetBios , token); +#else + var ipHostEntry = await Dns.GetHostEntryAsync(ipAddress); +#endif return ipHostEntry; } catch (ArgumentException argumentException) From a3f2914b6129ea45e59d41f88f0bc6b96478c9b1 Mon Sep 17 00:00:00 2001 From: Eric Williams Date: Mon, 15 Jul 2024 11:03:38 -0400 Subject: [PATCH 04/12] updated unit test project --- source/Directory.Build.props | 12 ++ .../Kangaroo.UI.Desktop.csproj | 1 + source/Kangaroo.UI/Kangaroo.UI.csproj | 1 + source/Kangaroo/Kangaroo.csproj | 10 +- tests/.keep | 128 ------------------ tests/Kangaroo.UnitTests.csproj | 3 +- 6 files changed, 17 insertions(+), 138 deletions(-) delete mode 100644 tests/.keep diff --git a/source/Directory.Build.props b/source/Directory.Build.props index 5d8722e..f98ce94 100644 --- a/source/Directory.Build.props +++ b/source/Directory.Build.props @@ -2,5 +2,17 @@ enable 11.0.2 + + en-US + LICENSE + True + ..\..\release\ + + + https://github.com/ewilliams0305/kangaroo + kangaroo-logo.png + README.md + https://github.com/ewilliams0305/kangaroo + network;ip;scanner;tool diff --git a/source/Kangaroo.UI.Desktop/Kangaroo.UI.Desktop.csproj b/source/Kangaroo.UI.Desktop/Kangaroo.UI.Desktop.csproj index d9c83ed..d2c2462 100644 --- a/source/Kangaroo.UI.Desktop/Kangaroo.UI.Desktop.csproj +++ b/source/Kangaroo.UI.Desktop/Kangaroo.UI.Desktop.csproj @@ -8,6 +8,7 @@ true app.manifest kangaroo.ico + false diff --git a/source/Kangaroo.UI/Kangaroo.UI.csproj b/source/Kangaroo.UI/Kangaroo.UI.csproj index c445df9..98e976a 100644 --- a/source/Kangaroo.UI/Kangaroo.UI.csproj +++ b/source/Kangaroo.UI/Kangaroo.UI.csproj @@ -4,6 +4,7 @@ enable latest true + false diff --git a/source/Kangaroo/Kangaroo.csproj b/source/Kangaroo/Kangaroo.csproj index d94cc8f..8e1cd40 100644 --- a/source/Kangaroo/Kangaroo.csproj +++ b/source/Kangaroo/Kangaroo.csproj @@ -10,16 +10,8 @@ True Kangaroo network scanner The kangaroo scanner is a network scanner designed to operate within a C# dotnet application. The kangaroo scanner allows you to query network endpoints and operate common tasks against them. - https://github.com/ewilliams0305/kangaroo - kangaroo-logo.png - README.md - https://github.com/ewilliams0305/kangaroo - network;ip;scanner;tool False - en-US - LICENSE - True - ..\..\release\ + diff --git a/tests/.keep b/tests/.keep deleted file mode 100644 index 85cb798..0000000 --- a/tests/.keep +++ /dev/null @@ -1,128 +0,0 @@ -![Readme Image](../../docs/kangaroo-header.png) - -# kangaroo Network Scanner -![GitHub](https://img.shields.io/github/license/ewilliams0305/kangaroo) -![GitHub all releases](https://img.shields.io/github/downloads/ewilliams0305/kangaroo/total) -![Nuget](https://img.shields.io/nuget/dt/kangaroo) -[![GitHub issues](https://img.shields.io/github/issues/ewilliams0305/kangaroo)](https://github.com/ewilliams0305/kangaroo/issues) -![GitHub Repo stars](https://img.shields.io/github/stars/ewilliams0305/kangaroo?style=social) -![GitHub forks](https://img.shields.io/github/forks/ewilliams0305/kangaroo?style=social) - -*Kangaroos have large, powerful hind legs, large feet adapted for leaping* and so does the Kangaroo network scanner. - - -The kangaroo network scanner supports (or will support) the following features. - -![Static Badge](https://img.shields.io/badge/IP-SCAN-blue) -![Static Badge](https://img.shields.io/badge/PORT-SCAN-green) -![Static Badge](https://img.shields.io/badge/NODE-SCAN-blue) -![Static Badge](https://img.shields.io/badge/PARELLEL-SCAN-blue) - -## Table of Contents -1. [Building Scanners](#Building) -2. [Scanning Networks](#Scanning-Networks) - -# Building -Kangaroo leverages the builder pattern to ensure its always configured correctly before usage. - -*begin with a ScannerBuilder.Configure() method* -``` csharp -// IScanner implements IDisposable so optionally use a using statement -using var scanner = ScannerBuilder.Configure() -``` -If no additional options are provided the kangaroo will grab your first network interface that is up and use that subnet for scans. **(lies, not yet)** - -Begin chaining addition options together as depicted. - -``` csharp -using var scanner = ScannerBuilder - .Configure() - .WithAddresses(ips) - .WithParallelism(numberOfBatches: 10) - .WithNodeTimeout(TimeSpan.FromMilliseconds(250)) - .WithLogging( - LoggerFactory.Create(builder => - { - builder.AddConsole(); - })) - .Build(); - -var nodes = await scanner.QueryAddresses(); -Console.WriteLine(nodes.Dump()); -``` - -## IP Configuration -Optionally kangaroo can use specific IPs, a range of IPs, or scan an entire subnet - -*ip address collection* -``` csharp -using var scanner = ScannerBuilder - .Configure() - .WithAddresses(ips) // provide an IEnerable of IP addresses - .Build(); -``` -*subnetmask* -``` csharp -using var scanner = ScannerBuilder - .Configure() - .WithSubnet(ipAddress, 0x24) // provide an ip subnet to scan - .Build(); -``` - -*network interface* -``` csharp -using var scanner = ScannerBuilder - .Configure() - .withInterface(ethernet2) // provide an adapter to determine a subnet - .Build(); -``` - -*range of ips* -``` csharp -using var scanner = ScannerBuilder - .Configure() - .WithIpAddressRange(startIpAddress, endIpAddress) // provide a start and end address to scan a range of IPs - .Build(); -``` - -## Parellel Configuration - -After the ips are determined you can optionally execute the scans using the TPL, add the WithParallelism -method and provide a batch size. Each batch of IP addresses will be scanned in parellel. Each batch will contsin the number of IP addresses divided by the size of the provided addresses. -``` csharp -using var scanner = ScannerBuilder - .Configure() - .WithAddresses(ips) - .WithParallelism(numberOfBatches: 10) // of 254 addresses 25 batches of 10 addresses will be scanned. - .Build(); -``` - -## Ping Configuration -The ping can be configured as well. optional timeout and TTL can be provided to effectively speed up or slow down each query. A shorter timeout will allow kangaroo to fail faster on an unknown address. The TTL can be configured to ensure you are only scanning IP addresses within a physical boundary. A TTL of 1 would only ping devices on the physical switch. - -``` csharp -using var scanner = ScannerBuilder.Configure() - .WithIpAddresses(ips) - .WithTimeout(TimeSpan.FromSeconds(1)) -.Build(); -``` -## Logging Configuration -BYO(Logger) - -# Scanning Networks -So now you have a new Kangaroo Scanner. lets scan, await a call to `QueryAddresses(optionalCtx)` to return a `ScanResult` containing a list of network nodes, and scan results. - -``` csharp -var nodes = await scanner.QueryAddresses(); -Console.WriteLine(nodes.Dump()); -``` - -## IP Scanning - -## Port Scanner - -## Nodes - -## Scan Results - - diff --git a/tests/Kangaroo.UnitTests.csproj b/tests/Kangaroo.UnitTests.csproj index fad8d64..42ad028 100644 --- a/tests/Kangaroo.UnitTests.csproj +++ b/tests/Kangaroo.UnitTests.csproj @@ -1,9 +1,10 @@  - net6.0 + net6.0;net8.0 enable enable + 12 false true From 3294e71423356de1fc7689ab281ba76be2b6d32b Mon Sep 17 00:00:00 2001 From: Eric Williams Date: Mon, 15 Jul 2024 11:15:04 -0400 Subject: [PATCH 05/12] resolved all library warnings --- source/Directory.Build.props | 16 ++++++++++++++++ source/Kangaroo.CLI/Kangaroo.CLI.csproj | 7 ------- .../Kangaroo/Builder/Options/DefaultLogger.cs | 11 +++++++---- source/Kangaroo/Kangaroo.csproj | 17 ----------------- source/Kangaroo/Model/LiveNodeResult.cs | 8 ++++++++ source/Kangaroo/Model/NetworkNodeExtensions.cs | 9 +++++++++ source/Kangaroo/Scanners/IScannerEvents.cs | 4 ++-- source/Kangaroo/Scanners/OrderlyScanner.cs | 4 ++-- source/Kangaroo/Scanners/ParallelScanner.cs | 6 +++--- source/Kangaroo/Scanners/SingleScanner.cs | 14 ++++++++++++-- 10 files changed, 59 insertions(+), 37 deletions(-) diff --git a/source/Directory.Build.props b/source/Directory.Build.props index f98ce94..775aa86 100644 --- a/source/Directory.Build.props +++ b/source/Directory.Build.props @@ -15,4 +15,20 @@ https://github.com/ewilliams0305/kangaroo network;ip;scanner;tool + + + + True + \ + + + True + \ + + + True + \ + + + diff --git a/source/Kangaroo.CLI/Kangaroo.CLI.csproj b/source/Kangaroo.CLI/Kangaroo.CLI.csproj index 914d207..5403227 100644 --- a/source/Kangaroo.CLI/Kangaroo.CLI.csproj +++ b/source/Kangaroo.CLI/Kangaroo.CLI.csproj @@ -10,16 +10,9 @@ True True kangaroo - ..\..\release 0.2.1 Kangaroo CLI Tool A command line IP scanner - - https://github.com/ewilliams0305/kangaroo - kangaroo-logo.png - README.md - https://github.com/ewilliams0305/kangaroo - ..\..\release\ diff --git a/source/Kangaroo/Builder/Options/DefaultLogger.cs b/source/Kangaroo/Builder/Options/DefaultLogger.cs index 1e4a615..3a777d5 100644 --- a/source/Kangaroo/Builder/Options/DefaultLogger.cs +++ b/source/Kangaroo/Builder/Options/DefaultLogger.cs @@ -2,7 +2,7 @@ namespace Kangaroo; -internal sealed class DefaultLogger : ILogger +internal sealed class DefaultLogger : ILogger { #region Implementation of ILogger @@ -13,11 +13,14 @@ public void Log(LogLevel logLevel, EventId eventId, TState state, Except { return; } - +#if NET8_0_OR_GREATER + ArgumentNullException.ThrowIfNull(nameof(formatter)); +#else if (formatter == null) { throw new ArgumentNullException(nameof(formatter)); } +#endif var message = formatter(state, exception); @@ -34,10 +37,10 @@ public bool IsEnabled(LogLevel logLevel) return true; } - public IDisposable BeginScope(TState state) + public IDisposable BeginScope(TState state) where TState : notnull { return default!; } - #endregion +#endregion } \ No newline at end of file diff --git a/source/Kangaroo/Kangaroo.csproj b/source/Kangaroo/Kangaroo.csproj index 8e1cd40..bef576a 100644 --- a/source/Kangaroo/Kangaroo.csproj +++ b/source/Kangaroo/Kangaroo.csproj @@ -14,23 +14,6 @@ - - - - - True - \ - - - True - \ - - - True - \ - - - diff --git a/source/Kangaroo/Model/LiveNodeResult.cs b/source/Kangaroo/Model/LiveNodeResult.cs index cee1f84..855bb2c 100644 --- a/source/Kangaroo/Model/LiveNodeResult.cs +++ b/source/Kangaroo/Model/LiveNodeResult.cs @@ -2,6 +2,14 @@ namespace Kangaroo; +/// +/// Data returned from a scanned node +/// +/// The time the query took +/// The node latency reported from a ping test +/// The number of scanned network addresses. +/// The number of active network addresses +/// The addresses scanned public record LiveNodeResult( TimeSpan QueryTime, TimeSpan Latency, diff --git a/source/Kangaroo/Model/NetworkNodeExtensions.cs b/source/Kangaroo/Model/NetworkNodeExtensions.cs index 916d72f..dacfc11 100644 --- a/source/Kangaroo/Model/NetworkNodeExtensions.cs +++ b/source/Kangaroo/Model/NetworkNodeExtensions.cs @@ -1,7 +1,16 @@ namespace Kangaroo; +/// +/// extension methods to process network nodes +/// public static class NetworkNodeExtensions { + /// + /// Provides a live update with the network node provided. + /// + /// the node that was updated + /// the updated delegate + /// the node that published the update public static NetworkNode PublishStatus(this NetworkNode node, Action? statusUpdate = null) { diff --git a/source/Kangaroo/Scanners/IScannerEvents.cs b/source/Kangaroo/Scanners/IScannerEvents.cs index b8def63..118f7d7 100644 --- a/source/Kangaroo/Scanners/IScannerEvents.cs +++ b/source/Kangaroo/Scanners/IScannerEvents.cs @@ -8,10 +8,10 @@ public interface IScannerEvents /// /// Reports the status of the scan when the scan has started and when the scan has ended. /// - Action ScanStatusUpdate { get; set; } + Action? ScanStatusUpdate { get; set; } /// /// Reports the status of individual network nodes as they are scanned. /// - Action NodeStatusUpdate { get; set; } + Action? NodeStatusUpdate { get; set; } } \ No newline at end of file diff --git a/source/Kangaroo/Scanners/OrderlyScanner.cs b/source/Kangaroo/Scanners/OrderlyScanner.cs index aae16d3..41a0e5b 100644 --- a/source/Kangaroo/Scanners/OrderlyScanner.cs +++ b/source/Kangaroo/Scanners/OrderlyScanner.cs @@ -28,10 +28,10 @@ internal static OrderlyScanner CreateScanner( private readonly Stopwatch _stopWatch = new(); /// - public Action ScanStatusUpdate { get; set; } + public Action? ScanStatusUpdate { get; set; } /// - public Action NodeStatusUpdate { get; set; } + public Action? NodeStatusUpdate { get; set; } private OrderlyScanner(ILogger logger, IQueryNetworkNode querier, IEnumerable addresses) { diff --git a/source/Kangaroo/Scanners/ParallelScanner.cs b/source/Kangaroo/Scanners/ParallelScanner.cs index 1d592c5..b9e9f6e 100644 --- a/source/Kangaroo/Scanners/ParallelScanner.cs +++ b/source/Kangaroo/Scanners/ParallelScanner.cs @@ -25,10 +25,10 @@ internal static ParallelScanner CreateScanner( private readonly int _batchSize; /// - public Action ScanStatusUpdate { get; set; } + public Action? ScanStatusUpdate { get; set; } /// - public Action NodeStatusUpdate { get; set; } + public Action? NodeStatusUpdate { get; set; } private ParallelScanner(ILogger logger, IQueryNetworkNode querier, IEnumerable addresses, int batchSize) { @@ -117,7 +117,7 @@ public async IAsyncEnumerable NetworkQueryAsync(IEnumerable>> BatchedTaskFactoryIAsync(CancellationToken token = default) => + private List>> BatchedTaskFactoryIAsync(CancellationToken token = default) => _addresses .Select((x, index) => new { Address = x, Index = index }) .GroupBy(x => x.Index / _batchSize) diff --git a/source/Kangaroo/Scanners/SingleScanner.cs b/source/Kangaroo/Scanners/SingleScanner.cs index bab16d6..aa9dcf8 100644 --- a/source/Kangaroo/Scanners/SingleScanner.cs +++ b/source/Kangaroo/Scanners/SingleScanner.cs @@ -8,6 +8,10 @@ namespace Kangaroo; internal sealed class SingleScanner : IScanner { + /// + /// Starts a new scan build + /// + /// public static IScannerIpConfiguration Configure() { return new ScannerBuilder(); @@ -22,16 +26,22 @@ internal static SingleScanner CreateScanner( } /// - public Action ScanStatusUpdate { get; set; } + public Action? ScanStatusUpdate { get; set; } /// - public Action NodeStatusUpdate { get; set; } + public Action? NodeStatusUpdate { get; set; } private readonly ILogger _logger; private readonly IQueryNetworkNode _querier; private readonly IPAddress _address; private readonly Stopwatch _stopWatch = new(); + /// + /// Creates a new single network endpoint scanner + /// + /// logger output + /// querier + /// network address private SingleScanner(ILogger logger, IQueryNetworkNode querier, IPAddress address) { _logger = logger; From 7c255e1bffda486f47ed026878f510328f2df763 Mon Sep 17 00:00:00 2001 From: Eric Williams Date: Mon, 15 Jul 2024 11:25:43 -0400 Subject: [PATCH 06/12] added test targets --- .../Services/Database/DateTimeTypeHandler.cs | 2 +- .../Services/Database/SqliteDbInitializer.cs | 14 +++++--------- .../ViewModels/ConfigurationViewModel.cs | 14 ++++---------- source/Kangaroo.UI/ViewModels/MainViewModel.cs | 13 ++++++------- 4 files changed, 16 insertions(+), 27 deletions(-) diff --git a/source/Kangaroo.UI/Services/Database/DateTimeTypeHandler.cs b/source/Kangaroo.UI/Services/Database/DateTimeTypeHandler.cs index b464ce7..cab0769 100644 --- a/source/Kangaroo.UI/Services/Database/DateTimeTypeHandler.cs +++ b/source/Kangaroo.UI/Services/Database/DateTimeTypeHandler.cs @@ -13,6 +13,6 @@ public override void SetValue(IDbDataParameter parameter, DateTime dateTime) public override DateTime Parse(object value) { - return DateTime.Parse(value.ToString()); + return DateTime.Parse(value.ToString() ?? string.Empty); } } \ No newline at end of file diff --git a/source/Kangaroo.UI/Services/Database/SqliteDbInitializer.cs b/source/Kangaroo.UI/Services/Database/SqliteDbInitializer.cs index 7d7cb09..75bb769 100644 --- a/source/Kangaroo.UI/Services/Database/SqliteDbInitializer.cs +++ b/source/Kangaroo.UI/Services/Database/SqliteDbInitializer.cs @@ -1,4 +1,6 @@ -using Dapper; +#pragma warning disable IDE0290 + +using Dapper; using System; using System.Linq; using System.Threading.Tasks; @@ -34,14 +36,8 @@ public async Task InitializeAsync() { using var connection = await _dbConnectionFactory.CreateConnectionAsync(); - try - { - await connection.ExecuteAsync(CreateRecentScansTable); - } - catch (Exception e) - { - throw; - } + await connection.ExecuteAsync(CreateRecentScansTable); + } private const string CreateRecentScansTable = @"CREATE TABLE IF NOT EXISTS RecentScans ( diff --git a/source/Kangaroo.UI/ViewModels/ConfigurationViewModel.cs b/source/Kangaroo.UI/ViewModels/ConfigurationViewModel.cs index 141e7b7..76155db 100644 --- a/source/Kangaroo.UI/ViewModels/ConfigurationViewModel.cs +++ b/source/Kangaroo.UI/ViewModels/ConfigurationViewModel.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Avalonia.Media; -using Avalonia.Styling; +using Avalonia.Styling; using CommunityToolkit.Mvvm.ComponentModel; namespace Kangaroo.UI.ViewModels; @@ -12,9 +6,9 @@ namespace Kangaroo.UI.ViewModels; public partial class ConfigurationViewModel : ViewModelBase { - [ObservableProperty] private WithOptions _options; + [ObservableProperty] private WithOptions _options = new(); - [ObservableProperty] private string _dbLocation; + [ObservableProperty] private string _dbLocation = string.Empty; - [ObservableProperty] private ThemeVariant _themeVariant; + [ObservableProperty] private ThemeVariant _themeVariant = ThemeVariant.Dark; } diff --git a/source/Kangaroo.UI/ViewModels/MainViewModel.cs b/source/Kangaroo.UI/ViewModels/MainViewModel.cs index 8c2c22a..cbf726e 100644 --- a/source/Kangaroo.UI/ViewModels/MainViewModel.cs +++ b/source/Kangaroo.UI/ViewModels/MainViewModel.cs @@ -1,4 +1,6 @@ -using CommunityToolkit.Mvvm.ComponentModel; +#pragma warning disable IDE0028 + +using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using Kangaroo.UI.Models; using Microsoft.Extensions.DependencyInjection; @@ -9,8 +11,6 @@ namespace Kangaroo.UI.ViewModels; public partial class MainViewModel : ViewModelBase { - private readonly IScannerBuilder _scanner; - [ObservableProperty] private bool _isPaneOpen = true; @@ -18,7 +18,7 @@ public partial class MainViewModel : ViewModelBase private ViewModelBase _currentPage; [ObservableProperty] - private MenuItemTemplate _selectedMenuItem; + private MenuItemTemplate? _selectedMenuItem; partial void OnSelectedMenuItemChanged(MenuItemTemplate? value) { @@ -49,12 +49,11 @@ partial void OnSelectedMenuItemChanged(MenuItemTemplate? value) public MainViewModel() { - CurrentPage = App.Services.GetRequiredService(); + CurrentPage = App.Services!.GetRequiredService(); } - public MainViewModel(IScannerBuilder scanner, IServiceProvider provider) + public MainViewModel(IServiceProvider provider) { - _scanner = scanner; CurrentPage = provider.GetRequiredService(); } From 851c68e27ca62cd5b6ffc3212a6d47aada318217 Mon Sep 17 00:00:00 2001 From: Eric Williams Date: Mon, 15 Jul 2024 11:33:03 -0400 Subject: [PATCH 07/12] added ci workflows --- .github/workflows/dotnet-beta.yml | 95 ++++++++++++++++++++++++++++ .github/workflows/dotnet-release.yml | 86 +++++++++++++++++++++++++ .github/workflows/dotnet-test.yml | 33 ++++++++++ .github/workflows/library.yaml | 29 --------- .github/workflows/nuget.yaml | 62 ------------------ source/Kangaroo.sln | 2 - 6 files changed, 214 insertions(+), 93 deletions(-) create mode 100644 .github/workflows/dotnet-beta.yml create mode 100644 .github/workflows/dotnet-release.yml create mode 100644 .github/workflows/dotnet-test.yml delete mode 100644 .github/workflows/library.yaml delete mode 100644 .github/workflows/nuget.yaml diff --git a/.github/workflows/dotnet-beta.yml b/.github/workflows/dotnet-beta.yml new file mode 100644 index 0000000..0368d54 --- /dev/null +++ b/.github/workflows/dotnet-beta.yml @@ -0,0 +1,95 @@ +name: PUBLISH BETA + +on: + workflow_dispatch: + + pull_request: + types: + - closed + branches: + - 'development' + - 'dev/**' + - 'fix/**' + - 'bug/**' + - 'hotfix/**' + - 'feat/**' + - 'feature/**' + +jobs: + build: + if: github.event.pull_request.merged == true + + runs-on: ubuntu-latest + outputs: + Version: ${{ steps.gitversion.outputs.SemVer }} + CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 #fetch-depth is needed for GitVersion + + - name: Install GitVersion + uses: gittools/actions/gitversion/setup@v1.2.0 + with: + versionSpec: 5.x + + - name: Determine Version + uses: gittools/actions/gitversion/execute@v1.2.0 + id: gitversion + + - name: Display GitVersion outputs + run: | + echo "Version: ${{ steps.gitversion.outputs.SemVer }}" + echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}" + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.x + + - name: Dotnet Restore + run: dotnet restore ./source/**.sln + + - name: Build Source Projects + run: dotnet build ./source/**.sln -p:Version='${{ steps.gitversion.outputs.SemVer }}' -c Release + + - name: Pack NuGet Packages + run: dotnet pack ./source/**.sln -p:Version='${{ steps.gitversion.outputs.SemVer }}' -c Release -o bin/releasedFiles + + - name: Upload NuGet package to GitHub + uses: actions/upload-artifact@v4 + with: + name: nugetPackage + path: bin/releasedFiles + + release: + if: needs.build.outputs.CommitsSinceVersionSource > 0 + runs-on: ubuntu-latest + needs: build + + steps: + - name: Download nuget package artifact + uses: actions/download-artifact@v4 + with: + name: nugetPackage + path: bin/releasedFiles + + - name: Create Release + uses: ncipollo/release-action@v1.14.0 + with: + tag: ${{ needs.build.outputs.Version }} + name: Release ${{ needs.build.outputs.Version }} + body: Released via github actions workflow, see repository README.md + generateReleaseNotes: true + artifacts: "bin/releasedFiles/*" + prerelease: true + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Push packages to Nuget + run: | + for file in $(find bin/releasedFiles -type f -name "*.nupkg"); do + echo $file + dotnet nuget push $file --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate + done + diff --git a/.github/workflows/dotnet-release.yml b/.github/workflows/dotnet-release.yml new file mode 100644 index 0000000..986cf72 --- /dev/null +++ b/.github/workflows/dotnet-release.yml @@ -0,0 +1,86 @@ +name: PUBLISH RELEASE + +on: + workflow_dispatch: + + pull_request: + types: [closed] + branches: [main] + +jobs: + build: + if: github.event.pull_request.merged == true + + runs-on: ubuntu-latest + outputs: + Version: ${{ steps.gitversion.outputs.SemVer }} + CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 #fetch-depth is needed for GitVersion + + - name: Install GitVersion + uses: gittools/actions/gitversion/setup@v1.2.0 + with: + versionSpec: 5.x + + - name: Determine Version + uses: gittools/actions/gitversion/execute@v1.2.0 + id: gitversion + + - name: Display GitVersion outputs + run: | + echo "Version: ${{ steps.gitversion.outputs.SemVer }}" + echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}" + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.x + + - name: Dotnet Restore + run: dotnet restore ./source/**.sln + + - name: Build Source Projects + run: dotnet build ./source/**.sln -p:Version='${{ steps.gitversion.outputs.SemVer }}' -c Release + + - name: Pack NuGet Packages + run: dotnet pack ./source/**.sln -p:Version='${{ steps.gitversion.outputs.SemVer }}' -c Release -o bin/releasedFiles + + - name: Upload NuGet package to GitHub + uses: actions/upload-artifact@v4 + with: + name: nugetPackage + path: bin/releasedFiles + + release: + if: needs.build.outputs.CommitsSinceVersionSource > 0 && github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + needs: build + + steps: + - name: Download nuget package artifact + uses: actions/download-artifact@v4 + with: + name: nugetPackage + path: bin/releasedFiles + + - name: Create Release + uses: ncipollo/release-action@v1.14.0 + with: + tag: ${{ needs.build.outputs.Version }} + name: Release ${{ needs.build.outputs.Version }} + body: Released via github actions workflow, see repository README.md + generateReleaseNotes: true + artifacts: "bin/releasedFiles/*" + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Push packages to Nuget + run: | + for file in $(find bin/releasedFiles -type f -name "*.nupkg"); do + echo $file + dotnet nuget push $file --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate + done + diff --git a/.github/workflows/dotnet-test.yml b/.github/workflows/dotnet-test.yml new file mode 100644 index 0000000..7e024e5 --- /dev/null +++ b/.github/workflows/dotnet-test.yml @@ -0,0 +1,33 @@ +name: DOTNET TEST + +on: + + pull_request: + types: [opened, reopened, synchronize] + branches: + - "**" + +jobs: + dotnet-test: + + env: + BUILD_CONFIG: 'Release' + SOLUTION: './source/**.sln' + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.x + + - name: Restore dependencies + run: dotnet restore $SOLUTION + + - name: Build Solution + run: dotnet build $SOLUTION --no-restore + + - name: Test Solution + run: dotnet test $SOLUTION --no-restore --verbosity normal diff --git a/.github/workflows/library.yaml b/.github/workflows/library.yaml deleted file mode 100644 index dbcdf1f..0000000 --- a/.github/workflows/library.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# This workflow will build a .NET project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net - -name: Build and Test Library 🧪🔬👩‍🔬 - -on: - pull_request: - branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 6.x - - - name: Restore dependencies - run: dotnet restore source/Kangaroo.sln - - - name: Build Solution - run: dotnet build source/Kangaroo.sln --no-restore - - - name: Run Unit Tests - run: dotnet test tests/Kangaroo.UnitTests.csproj --no-build --verbosity normal \ No newline at end of file diff --git a/.github/workflows/nuget.yaml b/.github/workflows/nuget.yaml deleted file mode 100644 index b138106..0000000 --- a/.github/workflows/nuget.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# This workflow will build a .NET project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net - -name: Deploy NUGET 🚀👩‍🚀 - -#on: -# push: -# branches: [ "main" ] -# pull_request: -# branches: [ "main" ] - -#jobs: -# build: - -# runs-on: ubuntu-latest - -# steps: -# - uses: actions/checkout@v4 -# - name: Setup .NET -# uses: actions/setup-dotnet@v3 -# with: -# dotnet-version: 6.x - -# - name: Restore dependencies -# run: dotnet restore source/ClientBuilder.sln - -# - name: Build Solution -# run: dotnet build source/ClientBuilder.sln --no-restore - -# - name: Run Unit Tests -# run: dotnet test tests/Kangaroo.UnitTests/Kangaroo.UnitTests.csproj --no-build --verbosity normal - -# - name: Run Integration Tests -# run: dotnet test tests/Kangaroo.IntegrationTests/Kangaroo.IntegrationTests.csproj --no-build --verbosity normal - -on: - push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+" -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Verify commit exists in origin/main - run: | - git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* - git branch --remote --contains | grep origin/main - - name: Set VERSION variable from tag - run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV - - name: Build - run: dotnet build source/Kangaroo.csproj --configuration Release /p:Version=${VERSION} - - name: Test - run: dotnet test source/Kangaroo.csproj --configuration Release /p:Version=${VERSION} --no-build - - name: Pack - run: dotnet pack source/Kangaroo.csproj --configuration Release /p:Version=${VERSION} --no-build --output ./artifacts - - name: Push - run: dotnet nuget push ./artifacts/*{VERSION}.nupkg --source https://nuget.pkg.github.com/acraven/index.json --api-key ${secrets.NUGET_API_KEY} - env: - GITHUB_TOKEN: ${{ secrets.NUGET_API_KEY }} \ No newline at end of file diff --git a/source/Kangaroo.sln b/source/Kangaroo.sln index 4028959..c4e63b7 100644 --- a/source/Kangaroo.sln +++ b/source/Kangaroo.sln @@ -10,8 +10,6 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{657FBE6A-5E1B-4E5B-93C6-DB4CC457ABC5}" ProjectSection(SolutionItems) = preProject Directory.Build.props = Directory.Build.props - ..\.github\workflows\library.yaml = ..\.github\workflows\library.yaml - ..\.github\workflows\nuget.yaml = ..\.github\workflows\nuget.yaml ..\README.md = ..\README.md EndProjectSection EndProject From 3e01db83a5d410cd15cfbbd889bbc35fc037eda7 Mon Sep 17 00:00:00 2001 From: Eric Williams Date: Mon, 15 Jul 2024 11:37:38 -0400 Subject: [PATCH 08/12] chnaged ip loopback in unit tests --- tests/Queries/ParallelPing_Query_Tests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Queries/ParallelPing_Query_Tests.cs b/tests/Queries/ParallelPing_Query_Tests.cs index 32eee15..7c4ba00 100644 --- a/tests/Queries/ParallelPing_Query_Tests.cs +++ b/tests/Queries/ParallelPing_Query_Tests.cs @@ -16,7 +16,7 @@ public async Task Query_Returns_IpStatusSuccess_WhenIpIsValid() using var pingQuery = new QueryPingResultsParallel(new DefaultLogger(), new QueryOptions(1, TimeSpan.FromSeconds(1))); // Act - var ping = await pingQuery.Query(IPAddress.Loopback); + var ping = await pingQuery.Query(IPAddress.Parse("127.0.0.1")); // Assert From 88de7e449d0c38982f5f5b3c885615986eaec272 Mon Sep 17 00:00:00 2001 From: Eric Williams Date: Mon, 15 Jul 2024 11:39:22 -0400 Subject: [PATCH 09/12] Update ParallelPing_Query_Tests.cs --- tests/Queries/ParallelPing_Query_Tests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Queries/ParallelPing_Query_Tests.cs b/tests/Queries/ParallelPing_Query_Tests.cs index 7c4ba00..5fc3cae 100644 --- a/tests/Queries/ParallelPing_Query_Tests.cs +++ b/tests/Queries/ParallelPing_Query_Tests.cs @@ -16,7 +16,7 @@ public async Task Query_Returns_IpStatusSuccess_WhenIpIsValid() using var pingQuery = new QueryPingResultsParallel(new DefaultLogger(), new QueryOptions(1, TimeSpan.FromSeconds(1))); // Act - var ping = await pingQuery.Query(IPAddress.Parse("127.0.0.1")); + var ping = await pingQuery.Query(IPAddress.Parse("8.8.8.8")); // Assert From d4377512022345ebdba43c14a3929bc598746545 Mon Sep 17 00:00:00 2001 From: Eric Williams Date: Mon, 15 Jul 2024 11:41:25 -0400 Subject: [PATCH 10/12] added sudo --- .github/workflows/dotnet-test.yml | 2 +- tests/Queries/ParallelPing_Query_Tests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet-test.yml b/.github/workflows/dotnet-test.yml index 7e024e5..5c38892 100644 --- a/.github/workflows/dotnet-test.yml +++ b/.github/workflows/dotnet-test.yml @@ -30,4 +30,4 @@ jobs: run: dotnet build $SOLUTION --no-restore - name: Test Solution - run: dotnet test $SOLUTION --no-restore --verbosity normal + run: sudo dotnet test $SOLUTION --no-restore --verbosity normal diff --git a/tests/Queries/ParallelPing_Query_Tests.cs b/tests/Queries/ParallelPing_Query_Tests.cs index 5fc3cae..32eee15 100644 --- a/tests/Queries/ParallelPing_Query_Tests.cs +++ b/tests/Queries/ParallelPing_Query_Tests.cs @@ -16,7 +16,7 @@ public async Task Query_Returns_IpStatusSuccess_WhenIpIsValid() using var pingQuery = new QueryPingResultsParallel(new DefaultLogger(), new QueryOptions(1, TimeSpan.FromSeconds(1))); // Act - var ping = await pingQuery.Query(IPAddress.Parse("8.8.8.8")); + var ping = await pingQuery.Query(IPAddress.Loopback); // Assert From dd72b6a514a1bfa0d49da1fdf8cc4b284e9c2f24 Mon Sep 17 00:00:00 2001 From: Eric Williams Date: Mon, 15 Jul 2024 11:54:08 -0400 Subject: [PATCH 11/12] added pubish profiles to repo for CI --- .gitignore | 4 - docs/.gitignore | 398 ++++++++++++++++++++++++ release/.gitignore | 396 +++++++++++++++++++++++ release/.keep | 0 release/linux.pubxml | 18 ++ release/windows.pubxml | 19 ++ source/Directory.Build.props | 2 - source/Kangaroo.CLI/Kangaroo.CLI.csproj | 11 - tests/.gitignore | 398 ++++++++++++++++++++++++ 9 files changed, 1229 insertions(+), 17 deletions(-) create mode 100644 docs/.gitignore create mode 100644 release/.gitignore create mode 100644 release/.keep create mode 100644 release/linux.pubxml create mode 100644 release/windows.pubxml create mode 100644 tests/.gitignore diff --git a/.gitignore b/.gitignore index 8a30d25..fcfb605 100644 --- a/.gitignore +++ b/.gitignore @@ -19,8 +19,6 @@ mono_crash.* # Build results [Dd]ebug/ [Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ x64/ x86/ [Ww][Ii][Nn]32/ @@ -180,11 +178,9 @@ DocProject/Help/html publish/ # Publish Web Output -*.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted -*.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..8a30d25 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,398 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml diff --git a/release/.gitignore b/release/.gitignore new file mode 100644 index 0000000..2f7b9c5 --- /dev/null +++ b/release/.gitignore @@ -0,0 +1,396 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml diff --git a/release/.keep b/release/.keep new file mode 100644 index 0000000..e69de29 diff --git a/release/linux.pubxml b/release/linux.pubxml new file mode 100644 index 0000000..5fb8397 --- /dev/null +++ b/release/linux.pubxml @@ -0,0 +1,18 @@ + + + + + Release + Any CPU + ..\..\linux\release + FileSystem + <_TargetId>Folder + net8.0 + linux-x64 + true + true + false + + \ No newline at end of file diff --git a/release/windows.pubxml b/release/windows.pubxml new file mode 100644 index 0000000..2fa4f26 --- /dev/null +++ b/release/windows.pubxml @@ -0,0 +1,19 @@ + + + + + Release + Any CPU + ..\..\windows\release + FileSystem + <_TargetId>Folder + net8.0 + win-x86 + true + true + true + false + + \ No newline at end of file diff --git a/source/Directory.Build.props b/source/Directory.Build.props index 775aa86..3c92291 100644 --- a/source/Directory.Build.props +++ b/source/Directory.Build.props @@ -6,8 +6,6 @@ en-US LICENSE True - ..\..\release\ - https://github.com/ewilliams0305/kangaroo kangaroo-logo.png diff --git a/source/Kangaroo.CLI/Kangaroo.CLI.csproj b/source/Kangaroo.CLI/Kangaroo.CLI.csproj index 5403227..2fd6df3 100644 --- a/source/Kangaroo.CLI/Kangaroo.CLI.csproj +++ b/source/Kangaroo.CLI/Kangaroo.CLI.csproj @@ -19,17 +19,6 @@ - - - True - \ - - - True - \ - - - diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 0000000..8a30d25 --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1,398 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml From a52925fe5bfea991e5100eba01bd1a2f46b36257 Mon Sep 17 00:00:00 2001 From: Eric Williams Date: Mon, 15 Jul 2024 13:27:05 -0400 Subject: [PATCH 12/12] added publish outputs to ci --- .github/workflows/dotnet-beta.yml | 11 +++++++++++ .github/workflows/dotnet-release.yml | 11 +++++++++++ .gitignore | 12 ++++++++++++ release/linux.pubxml | 18 ------------------ release/windows.pubxml | 19 ------------------- .../Kangaroo.UI.Desktop.csproj | 5 +++++ 6 files changed, 39 insertions(+), 37 deletions(-) delete mode 100644 release/linux.pubxml delete mode 100644 release/windows.pubxml diff --git a/.github/workflows/dotnet-beta.yml b/.github/workflows/dotnet-beta.yml index 0368d54..ce2b628 100644 --- a/.github/workflows/dotnet-beta.yml +++ b/.github/workflows/dotnet-beta.yml @@ -57,6 +57,17 @@ jobs: - name: Pack NuGet Packages run: dotnet pack ./source/**.sln -p:Version='${{ steps.gitversion.outputs.SemVer }}' -c Release -o bin/releasedFiles + - name: Publish Linux + run: dotnet publish ./source/Kangaroo.UI.Desktop/Kangaroo.UI.Desktop.csproj -c Release -r linux-x64 --self-contained true --framework net8.0 --output ./release/linux -p:PublishSingleFile="true" -p:Version='${{ steps.gitversion.outputs.SemVer }}' + + - name: Publish Windows + run: dotnet publish .\source\Kangaroo.UI.Desktop\Kangaroo.UI.Desktop.csproj -c Release -r win-x86 --self-contained true --framework net8.0 --output ./release/windows -p:PublishSingleFile="true" -p:PublishReadyToRun="true" -p:Version='${{ steps.gitversion.outputs.SemVer }}' + + - name: Archive Published Outputs + run: | + tar -czvf bin/releasedFiles/kangaroo_scanner_linux.zip -C ./release/linux . + tar -czvf bin/releasedFiles/kangaroo_scanner_windows.zip -C ./release/windows . + - name: Upload NuGet package to GitHub uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/dotnet-release.yml b/.github/workflows/dotnet-release.yml index 986cf72..937997c 100644 --- a/.github/workflows/dotnet-release.yml +++ b/.github/workflows/dotnet-release.yml @@ -49,6 +49,17 @@ jobs: - name: Pack NuGet Packages run: dotnet pack ./source/**.sln -p:Version='${{ steps.gitversion.outputs.SemVer }}' -c Release -o bin/releasedFiles + - name: Publish Linux + run: dotnet publish ./source/Kangaroo.UI.Desktop/Kangaroo.UI.Desktop.csproj -c Release -r linux-x64 --self-contained true --framework net8.0 --output ./release/linux -p:PublishSingleFile="true" -p:Version='${{ steps.gitversion.outputs.SemVer }}' + + - name: Publish Windows + run: dotnet publish .\source\Kangaroo.UI.Desktop\Kangaroo.UI.Desktop.csproj -c Release -r win-x86 --self-contained true --framework net8.0 --output ./release/windows -p:PublishSingleFile="true" -p:PublishReadyToRun="true" -p:Version='${{ steps.gitversion.outputs.SemVer }}' + + - name: Archive Published Outputs + run: | + tar -czvf bin/releasedFiles/kangaroo_scanner_linux.zip -C ./release/linux . + tar -czvf bin/releasedFiles/kangaroo_scanner_windows.zip -C ./release/windows . + - name: Upload NuGet package to GitHub uses: actions/upload-artifact@v4 with: diff --git a/.gitignore b/.gitignore index fcfb605..c2d0b36 100644 --- a/.gitignore +++ b/.gitignore @@ -392,3 +392,15 @@ FodyWeavers.xsd # JetBrains Rider *.sln.iml +release/linux/Kangaroo Scanner +release/linux/Kangaroo.xml +release/linux/libe_sqlite3.so +release/linux/libHarfBuzzSharp.so +release/linux/libSkiaSharp.so +release/windows/av_libglesv2.dll +release/windows/e_sqlite3.dll +release/windows/Kangaroo Scanner.exe +release/windows/Kangaroo.xml +release/windows/kangaroo_scanner.db +release/windows/libHarfBuzzSharp.dll +release/windows/libSkiaSharp.dll diff --git a/release/linux.pubxml b/release/linux.pubxml deleted file mode 100644 index 5fb8397..0000000 --- a/release/linux.pubxml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Release - Any CPU - ..\..\linux\release - FileSystem - <_TargetId>Folder - net8.0 - linux-x64 - true - true - false - - \ No newline at end of file diff --git a/release/windows.pubxml b/release/windows.pubxml deleted file mode 100644 index 2fa4f26..0000000 --- a/release/windows.pubxml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Release - Any CPU - ..\..\windows\release - FileSystem - <_TargetId>Folder - net8.0 - win-x86 - true - true - true - false - - \ No newline at end of file diff --git a/source/Kangaroo.UI.Desktop/Kangaroo.UI.Desktop.csproj b/source/Kangaroo.UI.Desktop/Kangaroo.UI.Desktop.csproj index d2c2462..faf1653 100644 --- a/source/Kangaroo.UI.Desktop/Kangaroo.UI.Desktop.csproj +++ b/source/Kangaroo.UI.Desktop/Kangaroo.UI.Desktop.csproj @@ -9,6 +9,7 @@ app.manifest kangaroo.ico false + Kangaroo Scanner @@ -22,4 +23,8 @@ + + + +