Skip to content

Commit 17399f3

Browse files
Merge pull request #162 from ElectronNET/dev/move-to-globaltool
CLI is now a dotnet tool
2 parents e305029 + d50984a commit 17399f3

File tree

6 files changed

+23
-17
lines changed

6 files changed

+23
-17
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ language: csharp
22
mono: none
33
dotnet: 2.1.300
44
before_script:
5+
- export PATH="$PATH:/home/travis/.dotnet/tools"
56
- npm install electron-packager --global
67
script:
78
- ./buildAll.sh

ElectronNET.CLI/ElectronNET.CLI.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.0</TargetFramework>
6-
<AssemblyName>dotnet-electronize</AssemblyName>
5+
<TargetFramework>netcoreapp2.1</TargetFramework>
6+
<AssemblyName>electronize</AssemblyName>
77

88
<PackageType>DotnetCliTool</PackageType>
99
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
@@ -21,6 +21,7 @@ This package contains the dotnet tooling to electronize your application.</Descr
2121
<PackageTags>electron aspnetcore</PackageTags>
2222
<PackageReleaseNotes>Changelog: https://github.com/ElectronNET/Electron.NET/blob/master/Changelog.md</PackageReleaseNotes>
2323
<PackageIconUrl>https://raw.githubusercontent.com/ElectronNET/Electron.NET/master/assets/images/electron.net-logo-square.png</PackageIconUrl>
24+
<PackAsTool>true</PackAsTool>
2425
</PropertyGroup>
2526

2627
<ItemGroup>

ElectronNET.WebApp/ElectronNET.WebApp.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.0.0" />
2626
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.0" />
2727
</ItemGroup>
28-
<ItemGroup>
29-
<DotNetCliToolReference Include="ElectronNET.CLI" Version="*" />
30-
</ItemGroup>
3128
<ItemGroup>
3229
<ProjectReference Include="..\ElectronNET.API\ElectronNET.API.csproj" />
3330
</ItemGroup>

NuGet.config

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
<configuration>
33
<packageSources>
44
<clear />
5-
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
65
<add key="LocalDev" value="artifacts" />
6+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
77
</packageSources>
8-
98
</configuration>

buildAll.cmd

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,22 @@ dotnet build
1616

1717
echo "Invoke electronize build in WebApp Demo"
1818

19+
echo "Install CLI"
1920

20-
echo "/target xxx (dev-build)"
21-
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 "
21+
dotnet tool uninstall ElectronNET.CLI -g
22+
dotnet tool install ElectronNET.CLI -g
2223

24+
echo "/target xxx (dev-build)"
25+
electronize build /target custom win7-x86;win32 /dotnet-configuration Debug /electron-arch ia32 /electron-params "--prune=true "
2326

2427
echo "/target win (dev-build)"
25-
dotnet "../ElectronNET.CLI/bin/Debug/netcoreapp2.0/dotnet-electronize.dll" build /target win
28+
electronize build /target win
2629

2730
echo "/target linux (dev-build)"
28-
dotnet "../ElectronNET.CLI/bin/Debug/netcoreapp2.0/dotnet-electronize.dll" build /target linux
31+
electronize build /target linux
2932

3033
echo "/target custom win7-x86;win32 (dev-build)"
31-
dotnet "../ElectronNET.CLI/bin/Debug/netcoreapp2.0/dotnet-electronize.dll" build /target custom win7-x86;win32
34+
electronize build /target custom win7-x86;win32
3235

3336

3437
:: Be aware, that for non-electronnet-dev environments the correct

buildAll.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,23 @@ cd $dir/ElectronNET.WebApp
1717
dotnet restore
1818
dotnet build
1919

20+
echo "Install CLI as dotnet tool"
21+
22+
dotnet tool uninstall ElectronNET.CLI -g
23+
dotnet tool install ElectronNET.CLI -g
24+
2025
echo "Invoke electronize build in WebApp Demo"
2126
echo "/target win (dev-build)"
22-
dotnet "$dir/ElectronNET.CLI/bin/Debug/netcoreapp2.0/dotnet-electronize.dll" build /target win
27+
electronize build /target win
2328

2429
echo "/target linux (dev-build)"
25-
dotnet "$dir/ElectronNET.CLI/bin/Debug/netcoreapp2.0/dotnet-electronize.dll" build /target linux
30+
electronize build /target linux
2631

2732
echo "/target osx (dev-build)"
28-
dotnet "$dir/ElectronNET.CLI/bin/Debug/netcoreapp2.0/dotnet-electronize.dll" build /target osx
33+
electronize build /target osx
2934

3035
echo "/target custom win7-x86;win32 (dev-build)"
31-
dotnet "$dir/ElectronNET.CLI/bin/Debug/netcoreapp2.0/dotnet-electronize.dll" build /target custom "win7-x86;win32"
36+
electronize build /target custom "win7-x86;win32"
3237

3338
# Be aware, that for non-electronnet-dev environments the correct
3439
# invoke command would be dotnet electronize ...

0 commit comments

Comments
 (0)