Merge pull request #162 from ElectronNET/dev/move-to-globaltool

CLI is now a dotnet tool
This commit is contained in:
Gregor Biswanger
2018-09-25 18:33:24 +02:00
committed by GitHub
6 changed files with 23 additions and 17 deletions

View File

@@ -2,6 +2,7 @@ language: csharp
mono: none
dotnet: 2.1.300
before_script:
- export PATH="$PATH:/home/travis/.dotnet/tools"
- npm install electron-packager --global
script:
- ./buildAll.sh

View File

@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyName>dotnet-electronize</AssemblyName>
<TargetFramework>netcoreapp2.1</TargetFramework>
<AssemblyName>electronize</AssemblyName>
<PackageType>DotnetCliTool</PackageType>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
@@ -21,6 +21,7 @@ This package contains the dotnet tooling to electronize your application.</Descr
<PackageTags>electron aspnetcore</PackageTags>
<PackageReleaseNotes>Changelog: https://github.com/ElectronNET/Electron.NET/blob/master/Changelog.md</PackageReleaseNotes>
<PackageIconUrl>https://raw.githubusercontent.com/ElectronNET/Electron.NET/master/assets/images/electron.net-logo-square.png</PackageIconUrl>
<PackAsTool>true</PackAsTool>
</PropertyGroup>
<ItemGroup>

View File

@@ -25,9 +25,6 @@
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="ElectronNET.CLI" Version="*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ElectronNET.API\ElectronNET.API.csproj" />
</ItemGroup>

View File

@@ -2,8 +2,7 @@
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="LocalDev" value="artifacts" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>

View File

@@ -16,19 +16,22 @@ dotnet build
echo "Invoke electronize build in WebApp Demo"
echo "Install CLI"
dotnet tool uninstall ElectronNET.CLI -g
dotnet tool install ElectronNET.CLI -g
echo "/target xxx (dev-build)"
dotnet "../ElectronNET.CLI/bin/Debug/netcoreapp2.0/dotnet-electronize.dll" build /target custom win7-x86;win32 /dotnet-configuration Debug /electron-arch ia32 /electron-params "--prune=true "
electronize build /target custom win7-x86;win32 /dotnet-configuration Debug /electron-arch ia32 /electron-params "--prune=true "
echo "/target win (dev-build)"
dotnet "../ElectronNET.CLI/bin/Debug/netcoreapp2.0/dotnet-electronize.dll" build /target win
electronize build /target win
echo "/target linux (dev-build)"
dotnet "../ElectronNET.CLI/bin/Debug/netcoreapp2.0/dotnet-electronize.dll" build /target linux
electronize build /target linux
echo "/target custom win7-x86;win32 (dev-build)"
dotnet "../ElectronNET.CLI/bin/Debug/netcoreapp2.0/dotnet-electronize.dll" build /target custom win7-x86;win32
electronize build /target custom win7-x86;win32
:: Be aware, that for non-electronnet-dev environments the correct

View File

@@ -17,18 +17,23 @@ cd $dir/ElectronNET.WebApp
dotnet restore
dotnet build
echo "Install CLI as dotnet tool"
dotnet tool uninstall ElectronNET.CLI -g
dotnet tool install ElectronNET.CLI -g
echo "Invoke electronize build in WebApp Demo"
echo "/target win (dev-build)"
dotnet "$dir/ElectronNET.CLI/bin/Debug/netcoreapp2.0/dotnet-electronize.dll" build /target win
electronize build /target win
echo "/target linux (dev-build)"
dotnet "$dir/ElectronNET.CLI/bin/Debug/netcoreapp2.0/dotnet-electronize.dll" build /target linux
electronize build /target linux
echo "/target osx (dev-build)"
dotnet "$dir/ElectronNET.CLI/bin/Debug/netcoreapp2.0/dotnet-electronize.dll" build /target osx
electronize build /target osx
echo "/target custom win7-x86;win32 (dev-build)"
dotnet "$dir/ElectronNET.CLI/bin/Debug/netcoreapp2.0/dotnet-electronize.dll" build /target custom "win7-x86;win32"
electronize build /target custom "win7-x86;win32"
# Be aware, that for non-electronnet-dev environments the correct
# invoke command would be dotnet electronize ...