-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* New optional build parameters added
* New electronize add command support added * Some rid removed and added based on new .NET Core RID catalog. See dotnet/docs#8710 and https://github.com/dotnet/docs/blob/master/docs/core/rid-catalog.md * cake depedency market as private asset and updated to 0.34.1. * cake.build script improvments * unit test packages update. * Since Electron.NET releases its first stable version https://github.com/ElectronNET/Electron.NET/releases/tag/5.22.14 this the first stable version of Cake.Electron.Net
- Loading branch information
1 parent
1dd5b21
commit 6d5c5e7
Showing
16 changed files
with
730 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
using Cake.Core; | ||
using Cake.Core.Annotations; | ||
using Cake.Electron.Net.Commands.Settings; | ||
using Cake.Electron.Net.Utils; | ||
|
||
namespace Cake.Electron.Net.Commands | ||
{ | ||
public static class ElectronNetAdder | ||
{ | ||
private const string CmdBase = "electronize add"; | ||
|
||
[CakeMethodAlias] | ||
public static int ElectronNetAdd(this ICakeContext context, ElectronNetAddSettings settings) | ||
{ | ||
if (settings == null) | ||
{ | ||
throw new ArgumentNullException(nameof(settings)); | ||
} | ||
|
||
return ElectronNetAdd(context, settings.WorkingDirectory, settings.Add.Value); | ||
} | ||
|
||
[CakeMethodAlias] | ||
public static int ElectronNetAdd(this ICakeContext context, string workingDirectory, string add) | ||
{ | ||
if (workingDirectory == null) | ||
{ | ||
throw new ArgumentNullException(nameof(workingDirectory)); | ||
} | ||
|
||
if (string.IsNullOrEmpty(add)) | ||
{ | ||
throw new ArgumentNullException(nameof(add)); | ||
} | ||
|
||
string cmd = $"{CmdBase} {add}"; | ||
|
||
return ElectronCakeContext.Current.ProcessHelper.CmdExecute(cmd, workingDirectory); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/Cake.Electron.Net/Commands/Settings/ElectronNetAddSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Cake.Electron.Net.Contracts; | ||
|
||
namespace Cake.Electron.Net.Commands.Settings | ||
{ | ||
public class ElectronNetAddSettings : ICommandSettings | ||
{ | ||
public ElectronAdd Add { get; set; } | ||
|
||
public string WorkingDirectory { get; set; } | ||
} | ||
} |
34 changes: 22 additions & 12 deletions
34
src/Cake.Electron.Net/Commands/Settings/ElectronNetBuildSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
namespace Cake.Electron.Net.Commands.Settings | ||
{ | ||
public class ElectronNetBuildSettings | ||
{ | ||
public ElectronTarget ElectronTarget { get; set; } = ElectronTarget.Win; | ||
|
||
public DotNetConfig DotNetConfig { get; set; } = DotNetConfig.Release; | ||
|
||
public string[] ElectronParams { get; set; } | ||
|
||
public string WorkingDirectory { get; set; } | ||
} | ||
using Cake.Electron.Net.Contracts; | ||
|
||
namespace Cake.Electron.Net.Commands.Settings | ||
{ | ||
public class ElectronNetBuildSettings : IBuildCommandSettings | ||
{ | ||
public ElectronTarget ElectronTarget { get; set; } = ElectronTarget.Win; | ||
|
||
public DotNetConfig DotNetConfig { get; set; } = DotNetConfig.Release; | ||
|
||
public string RelativePath { get; set; } | ||
|
||
public string AbsolutePath { get; set; } | ||
|
||
public string PackageJson { get; set; } | ||
|
||
public bool InstallModules { get; set; } = false; | ||
|
||
public string[] ElectronParams { get; set; } | ||
|
||
public string WorkingDirectory { get; set; } | ||
} | ||
} |
38 changes: 24 additions & 14 deletions
38
src/Cake.Electron.Net/Commands/Settings/ElectronNetCustomBuildSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
namespace Cake.Electron.Net.Commands.Settings | ||
{ | ||
public class ElectronNetCustomBuildSettings | ||
{ | ||
public ElectronTargetCustom ElectronTargetCustom { get; set; } = ElectronTargetCustom.Win10WinSrv2016X64; | ||
|
||
public string ElectronArch { get; set; } | ||
|
||
public DotNetConfig DotNetConfig { get; set; } = DotNetConfig.Release; | ||
|
||
public string[] ElectronParams { get; set; } | ||
|
||
public string WorkingDirectory { get; set; } | ||
} | ||
using Cake.Electron.Net.Contracts; | ||
|
||
namespace Cake.Electron.Net.Commands.Settings | ||
{ | ||
public class ElectronNetCustomBuildSettings : IBuildCommandSettings | ||
{ | ||
public ElectronTargetCustom ElectronTargetCustom { get; set; } = ElectronTargetCustom.Win10WinSrv2016X64; | ||
|
||
public string ElectronArch { get; set; } | ||
|
||
public DotNetConfig DotNetConfig { get; set; } = DotNetConfig.Release; | ||
|
||
public string RelativePath { get; set; } | ||
|
||
public string AbsolutePath { get; set; } | ||
|
||
public string PackageJson { get; set; } | ||
|
||
public bool InstallModules { get; set; } = false; | ||
|
||
public string[] ElectronParams { get; set; } | ||
|
||
public string WorkingDirectory { get; set; } | ||
} | ||
} |
18 changes: 10 additions & 8 deletions
18
src/Cake.Electron.Net/Commands/Settings/ElectronNetInitSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
namespace Cake.Electron.Net.Commands.Settings | ||
{ | ||
public class ElectronNetInitSettings | ||
{ | ||
public string WorkingDirectory { get; set; } | ||
|
||
public string Path { get; set; } | ||
} | ||
using Cake.Electron.Net.Contracts; | ||
|
||
namespace Cake.Electron.Net.Commands.Settings | ||
{ | ||
public class ElectronNetInitSettings : ICommandSettings | ||
{ | ||
public string WorkingDirectory { get; set; } | ||
|
||
public string Path { get; set; } | ||
} | ||
} |
Oops, something went wrong.