-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Cake Script and Frosting examples using Cake v0.38.5
- Loading branch information
1 parent
d9f2f3a
commit 347751c
Showing
35 changed files
with
485 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": 1, | ||
"isRoot": true, | ||
"tools": { | ||
"cake.tool": { | ||
"version": "0.38.5", | ||
"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,9 @@ | ||
#windows | ||
Thumbs.db | ||
|
||
#osx | ||
.DS_Store | ||
._* | ||
|
||
#cake | ||
.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,13 @@ | ||
#addin "nuget:?package=Cake.PackageType.Addin&version=0.1.0" | ||
|
||
Task("ExampleHelloAddin") | ||
.Does(() => | ||
{ | ||
Information("Addin: Start"); | ||
|
||
Hello(); | ||
|
||
Information("Addin: End"); | ||
}); | ||
|
||
RunTarget("ExampleHelloAddin"); |
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,11 @@ | ||
@echo on | ||
@cd %~dp0 | ||
|
||
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 | ||
set DOTNET_CLI_TELEMETRY_OPTOUT=1 | ||
set DOTNET_NOLOGO=1 | ||
|
||
dotnet tool restore | ||
@if %ERRORLEVEL% neq 0 goto :eof | ||
|
||
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,13 @@ | ||
$ErrorActionPreference = 'Stop' | ||
|
||
Set-Location -LiteralPath $PSScriptRoot | ||
|
||
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = '1' | ||
$env:DOTNET_CLI_TELEMETRY_OPTOUT = '1' | ||
$env:DOTNET_NOLOGO = '1' | ||
|
||
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,12 @@ | ||
#!/usr/bin/env bash | ||
set -euox pipefail | ||
|
||
cd "$(dirname "${BASH_SOURCE[0]}")" | ||
|
||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 | ||
export DOTNET_CLI_TELEMETRY_OPTOUT=1 | ||
export DOTNET_NOLOGO=1 | ||
|
||
dotnet tool restore | ||
|
||
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,12 @@ | ||
[Nuget] | ||
Source=https://api.nuget.org/v3/index.json | ||
UseInProcessClient=true | ||
LoadDependencies=false | ||
|
||
[Paths] | ||
Tools=./.cake | ||
Addins=./.cake/addins | ||
Modules=./.cake/modules | ||
|
||
[Settings] | ||
SkipVerification=false |
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,7 @@ | ||
{ | ||
"sdk": { | ||
"allowPrerelease": false, | ||
"version": "5.0.100", | ||
"rollForward": "latestFeature" | ||
} | ||
} |
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": "0.38.5", | ||
"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,9 @@ | ||
#windows | ||
Thumbs.db | ||
|
||
#osx | ||
.DS_Store | ||
._* | ||
|
||
#cake | ||
.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,14 @@ | ||
#module "nuget:?package=Cake.PackageType.Module&version=0.1.0" | ||
#tool hello:?package=MyAwesomePackage&version=1.2.3 | ||
|
||
Task("ExampleHelloModule") | ||
.Does(() => | ||
{ | ||
Information("Module: Start"); | ||
|
||
Information("Hello Module!"); | ||
|
||
Information("Module: End"); | ||
}); | ||
|
||
RunTarget("ExampleHelloModule"); |
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,11 @@ | ||
@echo on | ||
@cd %~dp0 | ||
|
||
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 | ||
set DOTNET_CLI_TELEMETRY_OPTOUT=1 | ||
set DOTNET_NOLOGO=1 | ||
|
||
dotnet tool restore | ||
@if %ERRORLEVEL% neq 0 goto :eof | ||
|
||
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,13 @@ | ||
$ErrorActionPreference = 'Stop' | ||
|
||
Set-Location -LiteralPath $PSScriptRoot | ||
|
||
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = '1' | ||
$env:DOTNET_CLI_TELEMETRY_OPTOUT = '1' | ||
$env:DOTNET_NOLOGO = '1' | ||
|
||
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,12 @@ | ||
#!/usr/bin/env bash | ||
set -euox pipefail | ||
|
||
cd "$(dirname "${BASH_SOURCE[0]}")" | ||
|
||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 | ||
export DOTNET_CLI_TELEMETRY_OPTOUT=1 | ||
export DOTNET_NOLOGO=1 | ||
|
||
dotnet tool restore | ||
|
||
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,12 @@ | ||
[Nuget] | ||
Source=https://api.nuget.org/v3/index.json | ||
UseInProcessClient=true | ||
LoadDependencies=false | ||
|
||
[Paths] | ||
Tools=./.cake | ||
Addins=./.cake/addins | ||
Modules=./.cake/modules | ||
|
||
[Settings] | ||
SkipVerification=false |
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,7 @@ | ||
{ | ||
"sdk": { | ||
"allowPrerelease": false, | ||
"version": "5.0.100", | ||
"rollForward": "latestFeature" | ||
} | ||
} |
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": "0.38.5", | ||
"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,9 @@ | ||
#windows | ||
Thumbs.db | ||
|
||
#osx | ||
.DS_Store | ||
._* | ||
|
||
#cake | ||
.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,14 @@ | ||
#load "nuget:?package=Cake.PackageType.Recipe&version=0.1.0" | ||
|
||
Task("ExampleHelloRecipe") | ||
.Does(() => | ||
{ | ||
Information("Recipe: Start"); | ||
|
||
SayHello(System.Environment.UserName); | ||
SayBye(System.Environment.UserName); | ||
|
||
Information("Recipe: End"); | ||
}); | ||
|
||
RunTarget("ExampleHelloRecipe"); |
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,11 @@ | ||
@echo on | ||
@cd %~dp0 | ||
|
||
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 | ||
set DOTNET_CLI_TELEMETRY_OPTOUT=1 | ||
set DOTNET_NOLOGO=1 | ||
|
||
dotnet tool restore | ||
@if %ERRORLEVEL% neq 0 goto :eof | ||
|
||
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,13 @@ | ||
$ErrorActionPreference = 'Stop' | ||
|
||
Set-Location -LiteralPath $PSScriptRoot | ||
|
||
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = '1' | ||
$env:DOTNET_CLI_TELEMETRY_OPTOUT = '1' | ||
$env:DOTNET_NOLOGO = '1' | ||
|
||
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,12 @@ | ||
#!/usr/bin/env bash | ||
set -euox pipefail | ||
|
||
cd "$(dirname "${BASH_SOURCE[0]}")" | ||
|
||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 | ||
export DOTNET_CLI_TELEMETRY_OPTOUT=1 | ||
export DOTNET_NOLOGO=1 | ||
|
||
dotnet tool restore | ||
|
||
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,12 @@ | ||
[Nuget] | ||
Source=https://api.nuget.org/v3/index.json | ||
UseInProcessClient=true | ||
LoadDependencies=false | ||
|
||
[Paths] | ||
Tools=./.cake | ||
Addins=./.cake/addins | ||
Modules=./.cake/modules | ||
|
||
[Settings] | ||
SkipVerification=false |
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,7 @@ | ||
{ | ||
"sdk": { | ||
"allowPrerelease": false, | ||
"version": "5.0.100", | ||
"rollForward": "latestFeature" | ||
} | ||
} |
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,9 @@ | ||
#windows | ||
Thumbs.db | ||
|
||
#osx | ||
.DS_Store | ||
._* | ||
|
||
#cake | ||
.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,2 @@ | ||
#!/usr/bin/env bash | ||
DOTNET_VERSION=3.1.402 |
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,70 @@ | ||
#!/usr/bin/env pwsh | ||
$DotNetInstallerUri = 'https://dot.net/v1/dotnet-install.ps1'; | ||
$DotNetUnixInstallerUri = 'https://dot.net/v1/dotnet-install.sh' | ||
$DotNetChannel = 'LTS' | ||
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent | ||
|
||
[string] $DotNetVersion= '' | ||
foreach($line in Get-Content (Join-Path $PSScriptRoot 'build.config')) | ||
{ | ||
if ($line -like 'DOTNET_VERSION=*') { | ||
$DotNetVersion =$line.SubString(15) | ||
} | ||
} | ||
|
||
|
||
if ([string]::IsNullOrEmpty($DotNetVersion)) { | ||
'Failed to parse .NET Core SDK Version' | ||
exit 1 | ||
} | ||
|
||
$DotNetInstallerUri = "https://dot.net/v1/dotnet-install.ps1"; | ||
|
||
# Make sure tools folder exists | ||
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent | ||
$ToolPath = Join-Path $PSScriptRoot "tools" | ||
if (!(Test-Path $ToolPath)) { | ||
Write-Verbose "Creating tools directory..." | ||
New-Item -Path $ToolPath -Type directory | out-null | ||
} | ||
|
||
########################################################################### | ||
# INSTALL .NET CORE CLI | ||
########################################################################### | ||
|
||
Function Remove-PathVariable([string]$VariableToRemove) | ||
{ | ||
$path = [Environment]::GetEnvironmentVariable("PATH", "User") | ||
$newItems = $path.Split(';') | Where-Object { $_.ToString() -inotlike $VariableToRemove } | ||
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "User") | ||
$path = [Environment]::GetEnvironmentVariable("PATH", "Process") | ||
$newItems = $path.Split(';') | Where-Object { $_.ToString() -inotlike $VariableToRemove } | ||
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "Process") | ||
} | ||
|
||
# Get .NET Core CLI path if installed. | ||
$FoundDotNetCliVersion = $null; | ||
if (Get-Command dotnet -ErrorAction SilentlyContinue) { | ||
$FoundDotNetCliVersion = dotnet --version; | ||
} | ||
|
||
if($FoundDotNetCliVersion -ne $DotNetVersion) { | ||
$InstallPath = Join-Path $PSScriptRoot ".dotnet" | ||
if (!(Test-Path $InstallPath)) { | ||
mkdir -Force $InstallPath | Out-Null; | ||
} | ||
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallerUri, "$InstallPath\dotnet-install.ps1"); | ||
& $InstallPath\dotnet-install.ps1 -Version $DotNetVersion -InstallDir $InstallPath; | ||
|
||
Remove-PathVariable "$InstallPath" | ||
$env:PATH = "$InstallPath;$env:PATH" | ||
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 | ||
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1 | ||
} | ||
|
||
########################################################################### | ||
# RUN BUILD SCRIPT | ||
########################################################################### | ||
|
||
dotnet run --project build/Build.csproj -- $args | ||
exit $LASTEXITCODE; |
Oops, something went wrong.