Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
332 additions
and
49 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
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 @@ | ||
tools/ |
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 @@ | ||
$ErrorActionPreference = 'Stop' | ||
|
||
Set-Location -LiteralPath $PSScriptRoot | ||
|
||
# make sure we always get a fresh nuget-package and nothing from cache! | ||
dotnet nuget locals all --clear | ||
|
||
if(Test-Path .\build\tools) { | ||
rm -Force -Recurse .\build\tools | ||
} | ||
|
||
dotnet add .\build\Build.csproj package Cake.Npm.Module --prerelease | ||
dotnet run --project build\Build.csproj -- $args | ||
exit $LASTEXITCODE; |
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 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Cake.Frosting" Version="1.2.0" /> | ||
<PackageReference Include="Cake.Npm.Module" Version="2.1.0-alpha0052" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Remove="tools\**" /> | ||
</ItemGroup> | ||
</Project> |
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,43 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Cake.Common; | ||
using Cake.Common.Diagnostics; | ||
using Cake.Core; | ||
using Cake.Core.IO; | ||
using Cake.Frosting; | ||
|
||
public static class Program | ||
{ | ||
public static int Main(string[] args) | ||
{ | ||
return new CakeHost() | ||
.UseModule<Cake.Npm.Module.NpmModule>() | ||
.InstallTool(new Uri("npm://?package=yo&caketools")) | ||
.UseWorkingDirectory("..") | ||
.Run(args); | ||
} | ||
} | ||
|
||
[TaskName("Default")] | ||
public class DefaultTask : FrostingTask | ||
{ | ||
public override void Run(ICakeContext context) | ||
{ | ||
var yo = context.Tools.Resolve(context.IsRunningOnWindows() ? "yo.cmd" : "yo"); | ||
if(yo == null) { | ||
context.Error("Something is very wrong."); | ||
throw new Exception("yo not found!"); | ||
} | ||
context.Information("yo installed at: " + yo.FullPath); | ||
IEnumerable<string> version; | ||
context.StartProcess( | ||
yo, | ||
new ProcessSettings { | ||
Arguments = "--version", | ||
RedirectStandardOutput = true | ||
}, | ||
out version); | ||
context.Information("yo version: " + version.First()); | ||
} | ||
} |
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,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<config> | ||
</config> | ||
<packageSources> | ||
<clear /> | ||
<add key="local pkg" value="../../BuildArtifacts/Packages/NuGet/" /> | ||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> | ||
</packageSources> | ||
</configuration> |
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,12 @@ | ||
{ | ||
"version": 1, | ||
"isRoot": true, | ||
"tools": { | ||
"cake.tool": { | ||
"version": "1.2.0", | ||
"commands": [ | ||
"dotnet-cake" | ||
] | ||
} | ||
} | ||
} |
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 @@ | ||
tools/ |
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,23 @@ | ||
#module nuget://?package=Cake.Npm.Module&prerelease | ||
#tool npm://?package=yo&caketools | ||
|
||
Task("Default") | ||
.Does(() => { | ||
var yo = Context.Tools.Resolve(IsRunningOnWindows() ? "yo.cmd" : "yo"); | ||
if(yo == null) { | ||
Error("Something is very wrong."); | ||
throw new Exception("yo not found!"); | ||
} | ||
Information("yo installed at: " + yo.FullPath); | ||
IEnumerable<string> version; | ||
StartProcess( | ||
yo, | ||
new ProcessSettings { | ||
Arguments = "--version", | ||
RedirectStandardOutput = true | ||
}, | ||
out version); | ||
Information("yo version: " + version.First()); | ||
}); | ||
|
||
RunTarget("Default"); |
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,21 @@ | ||
$ErrorActionPreference = 'Stop' | ||
|
||
Set-Location -LiteralPath $PSScriptRoot | ||
|
||
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = '1' | ||
$env:DOTNET_CLI_TELEMETRY_OPTOUT = '1' | ||
$env:DOTNET_NOLOGO = '1' | ||
$env:CAKE_SETTINGS_SKIPPACKAGEVERSIONCHECK = 'true' | ||
|
||
# make sure we always get a fresh nuget-package and nothing from cache! | ||
dotnet nuget locals all --clear | ||
|
||
if(Test-Path .\tools) { | ||
rm -Force -Recurse .\tools | ||
} | ||
|
||
dotnet tool restore | ||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | ||
|
||
dotnet cake @args | ||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } |
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,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<config> | ||
</config> | ||
<packageSources> | ||
<clear /> | ||
<add key="local pkg" value="../../BuildArtifacts/Packages/NuGet/" /> | ||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> | ||
</packageSources> | ||
</configuration> |
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
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
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
Oops, something went wrong.