diff --git a/.editorconfig b/.editorconfig
index a709d6b..2b0b2cb 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,14 +1,36 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://EditorConfig.org
+
root = true
[*]
-end_of_line = CRLF
+charset = utf-8
+end_of_line = lf
+indent_size = 4
+indent_style = space
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.{sln,csproj}]
+end_of_line = crlf
+
+[*.md]
+trim_trailing_whitespace = false
[*.ps1]
indent_style = space
indent_size = 2
+charset = utf-8-bom
+end_of_line = crlf
+
+[*.{yml,yaml}]
+indent_size = 2
+indent_style = space
+
+# Files that need to be crlf eol to work
+[tasks.json]
+end_of_line = crlf
[*.cs]
indent_style = space
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..a1e1e97
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,63 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
+
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln merge=binary
+#*.csproj merge=binary
+#*.vbproj merge=binary
+#*.vcxproj merge=binary
+#*.vcproj merge=binary
+#*.dbproj merge=binary
+#*.fsproj merge=binary
+#*.lsproj merge=binary
+#*.wixproj merge=binary
+#*.modelproj merge=binary
+#*.sqlproj merge=binary
+#*.wwaproj merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg binary
+#*.png binary
+#*.gif binary
+
+###############################################################################
+# diff behavior for common document formats
+#
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the
+# entries below.
+###############################################################################
+#*.doc diff=astextplain
+#*.DOC diff=astextplain
+#*.docx diff=astextplain
+#*.DOCX diff=astextplain
+#*.dot diff=astextplain
+#*.DOT diff=astextplain
+#*.pdf diff=astextplain
+#*.PDF diff=astextplain
+#*.rtf diff=astextplain
+#*.RTF diff=astextplain
\ No newline at end of file
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..b289495
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,13 @@
+
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..6a672a3
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,31 @@
+name: Build
+on:
+ pull_request:
+ push:
+ branches:
+ - master
+ - develop
+jobs:
+ build:
+ name: Build
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [windows-latest, ubuntu-latest, macos-latest]
+ steps:
+ - name: Get the sources
+ uses: actions/checkout@v2
+
+ - name: Fetch all history for all tags and branches
+ run: git fetch --prune --unshallow
+
+ - name: Install .NET Core SDK 3.1.301
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: '3.1.301'
+
+ - name: Run Frosting Build
+ env:
+ DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX: 2
+ run: |
+ dotnet run --project ./build/Build.csproj
diff --git a/.gitignore b/.gitignore
index a46f1c5..f46ccd7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -70,3 +70,5 @@ packages
# Windows
Thumbs.db
+
+.DS_Store
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..021c03b
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,24 @@
+# Contributor Code of Conduct
+
+As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
+
+We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
+
+Examples of unacceptable behavior by participants include:
+
+- The use of sexualized language or imagery
+- Personal attacks
+- Trolling or insulting/derogatory comments
+- Public or private harassment
+- Publishing other's private information, such as physical or electronic addresses, without explicit permission
+- Other unethical or unprofessional conduct
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
+
+By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
+
+This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a project maintainer at [caketeam@cakebuild.net](mailto:caketeam@cakebuild.net). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident.
+
+This Code of Conduct is adapted from the Contributor Covenant, version 1.3.0, available from http://contributor-covenant.org/version/1/3/0/
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..b331d9a
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,164 @@
+# Contribution Guidelines
+
+* [Prerequisites](#prerequisites)
+* [Definition of trivial contributions](#definition-of-trivial-contributions)
+* [Code](#code)
+ * [Code style](#code-style)
+ * [Dependencies](#dependencies)
+ * [Unit tests](#unit-tests)
+* [Contributing process](#contributing-process)
+ * [Get buyoff or find open community issues or features](#get-buyoff-or-find-open-community-issues-or-features)
+ * [Set up your environment](#Set-up-your-environment)
+ * [Prepare commits](#prepare-commits)
+ * [Submit pull request](#Submit-pull-request)
+ * [Respond to feedback on pull request](#respond-to-feedback-on-pull-request)
+* [Other general information](#other-general-information)
+* [Acknowledgement](#acknowledgement)
+
+## Prerequisites
+
+By contributing to Cake, you assert that:
+
+* The contribution is your own original work.
+* You have the right to assign the copyright for the work (it is not owned by your employer, or
+ you have been given copyright assignment in writing).
+* You [license](https://github.com/cake-build/cake/blob/develop/LICENSE) the contribution under the terms applied to the rest of the Cake project.
+* You agree to follow the [code of conduct](https://github.com/cake-build/cake/blob/develop/CODE_OF_CONDUCT.md).
+
+## Definition of trivial contributions
+It's hard to define what is a trivial contribution. Sometimes even a 1 character change can be considered significant.
+Unfortunately because it can be subjective, the decision on what is trivial comes from the maintainers of the project
+and not from folks contributing to the project.
+
+What is generally considered trivial:
+
+* Fixing a typo.
+* Documentation changes.
+* Fixes to non-production code - like fixing something small in the build code.
+
+What is generally not considered trivial:
+
+ * Changes to any code that would be delivered as part of the final product.
+ This includes any scripts that are delivered, such as the PowerShell bootstrapper.
+ Yes, even 1 character changes could be considered non-trivial.
+
+## Code
+### Code style
+
+Normal .NET coding guidelines apply.
+See the [Framework Design Guidelines](https://msdn.microsoft.com/en-us/library/ms229042%28v=vs.110%29.aspx) for more information.
+
+### Unit tests
+
+Make sure to run all unit tests before creating a pull request.
+Any new code should also have reasonable unit test coverage.
+
+## Contributing process
+### Get buyoff or find open community issues or features
+
+ * Through GitHub, or through the [Gitter chat](https://gitter.im/cake-build/cake) (preferred),
+ you talk about a feature you would like to see (or a bug), and why it should be in Cake.
+ * If approved through the Gitter chat, ensure an accompanying GitHub issue is created with
+ information and a link back to the discussion.
+ * Once you get a nod from one of the [Cake Team](https://github.com/cake-build?tab=members), you can start on the feature.
+ * Alternatively, if a feature is on the issues list with the
+ [Up For Grabs](https://github.com/cake-build/frosting/labels/up-for-grabs) label,
+ it is open for a community member (contributor) to patch. You should comment that you are signing up for it on
+ the issue so someone else doesn't also sign up for the work.
+
+### Set up your environment
+
+ * You create, or update, a fork of cake-build/frosting under your GitHub account.
+ * From there you create a branch named specific to the feature.
+ * In the branch you do work specific to the feature.
+ * Please also observe the following:
+ * No reformatting
+ * No changing files that are not specific to the feature.
+ * More covered below in the **Prepare commits** section.
+ * Test your changes and please help us out by updating and implementing some automated tests.
+ It is recommended that all contributors spend some time looking over the tests in the source code.
+ You can't go wrong emulating one of the existing tests and then changing it specific to the behavior you are testing.
+ * Please do not update your branch from the develop unless we ask you to. See the responding to feedback section below.
+
+### Prepare commits
+This section serves to help you understand what makes a good commit.
+
+A commit should observe the following:
+
+ * A commit is a small logical unit that represents a change.
+ * Should include new or changed tests relevant to the changes you are making.
+ * No unnecessary whitespace. Check for whitespace with `git diff --check` and `git diff --cached --check` before commit.
+ * You can stage parts of a file for commit.
+
+### Submit pull request
+Prerequisites:
+
+ * You are making commits in a feature branch.
+ * All code should compile without errors or warnings.
+ * All tests should be passing.
+
+Submitting PR:
+
+ * Once you feel it is ready, submit the pull request to the `cake-build/frosting` repository against the `develop` branch
+ unless specifically requested to submit it against another branch.
+ * In the case of a larger change that is going to require more discussion,
+ please submit a PR sooner. Waiting until you are ready may mean more changes than you are
+ interested in if the changes are taking things in a direction the maintainers do not want to go.
+ * In the pull request, outline what you did and point to specific conversations (as in URLs)
+ and issues that you are resolving. This is a tremendous help for us in evaluation and acceptance.
+ * Once the pull request is in, please do not delete the branch or close the pull request
+ (unless something is wrong with it).
+ * One of the Cake team members, or one of the maintainers, will evaluate it within a
+ reasonable time period (which is to say usually within 1-3 weeks). Some things get evaluated
+ faster or fast tracked. We are human and we have active lives outside of open source so don't
+ fret if you haven't seen any activity on your pull request within a month or two.
+ We don't have a Service Level Agreement (SLA) for pull requests.
+ Just know that we will evaluate your pull request.
+
+### Respond to feedback on pull request
+
+We may have feedback for you to fix or change some things. We generally like to see that pushed against
+the same topic branch (it will automatically update the Pull Request). You can also fix/squash/rebase
+commits and push the same topic branch with `--force` (it's generally acceptable to do this on topic
+branches not in the main repository, it is generally unacceptable and should be avoided at all costs
+against the main repository).
+
+If we have comments or questions when we do evaluate it and receive no response, it will probably
+lessen the chance of getting accepted. Eventually, this means it will be closed if it is not accepted.
+Please know this doesn't mean we don't value your contribution, just that things go stale. If in the
+future you want to pick it back up, feel free to address our concerns/questions/feedback and reopen
+the issue/open a new PR (referencing old one).
+
+Sometimes we may need you to rebase your commit against the latest code before we can review it further.
+If this happens, you can do the following:
+
+ * `git fetch upstream` (upstream would be the mainstream repo or `cake-build/frosting` in this case)
+ * `git checkout develop`
+ * `git rebase upstream/develop`
+ * `git checkout your-branch`
+ * `git rebase develop`
+ * Fix any merge conflicts
+ * `git push origin your-branch` (origin would be your GitHub repo or `your-github-username/cake` in this case).
+ You may need to `git push origin your-branch --force` to get the commits pushed.
+ This is generally acceptable with topic branches not in the mainstream repository.
+
+The only reasons a pull request should be closed and resubmitted are as follows:
+
+ * When the pull request is targeting the wrong branch (this doesn't happen as often).
+ * When there are updates made to the original by someone other than the original contributor.
+ Then the old branch is closed with a note on the newer branch this supersedes #github_number.
+
+## Other general information
+If you reformat code or hit core functionality without an approval from a person on the Cake Team,
+it's likely that no matter how awesome it looks afterwards, it will probably not get accepted.
+Reformatting code makes it harder for us to evaluate exactly what was changed.
+
+If you do these things, it will be make evaluation and acceptance easy.
+Now if you stray outside of the guidelines we have above, it doesn't mean we are going to ignore
+your pull request. It will just make things harder for us.
+Harder for us roughly translates to a longer SLA for your pull request.
+
+## Acknowledgement
+
+This contribution guide was taken from the [Chocolatey project](https://chocolatey.org/)
+with permission and was edited to follow Cake's conventions and processes.
diff --git a/GitReleaseManager.yaml b/GitReleaseManager.yaml
new file mode 100644
index 0000000..c85f3d7
--- /dev/null
+++ b/GitReleaseManager.yaml
@@ -0,0 +1,28 @@
+issue-labels-include:
+- Breaking change
+- Feature
+- Bug
+- Improvement
+- Documentation
+issue-labels-exclude:
+- Build
+issue-labels-alias:
+ - name: Documentation
+ header: Documentation
+ plural: Documentation
+create:
+ include-sha-section: true
+ sha-section-heading: "SHA256 Hashes of the release artifacts"
+ sha-section-line-format: "- `{1}\t{0}`"
+close:
+ use-issue-comments: true
+ issue-comment: |-
+ :tada: This issue has been resolved in version {milestone} :tada:
+
+ The release is available on:
+
+ - [GitHub Release](https://github.com/{owner}/{repository}/releases/tag/{milestone})
+ - [NuGet Package](https://www.nuget.org/packages/Cake/{milestone})
+
+ Your **[GitReleaseManager](https://github.com/GitTools/GitReleaseManager)** bot :package::rocket:
+
diff --git a/README.md b/README.md
index bc84514..277d329 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,9 @@
# Frosting
-[![AppVeyor branch](https://img.shields.io/appveyor/ci/cakebuild/frosting/develop.svg)](https://ci.appveyor.com/project/cakebuild/frosting/branch/develop)
-[![MyGet](https://img.shields.io/myget/cake/vpre/Cake.Frosting.svg?label=myget)](https://www.myget.org/feed/cake/package/nuget/Cake.Frosting)
-[![NuGet](https://img.shields.io/nuget/v/Cake.Frosting.svg)](https://www.nuget.org/packages/Cake.Frosting)
+[![NuGet](https://img.shields.io/nuget/v/Cake.Frosting.svg)](https://www.nuget.org/packages/Cake.Frosting) [![Azure Artifacts](https://azpkgsshield.azurevoodoo.net/cake-build/Cake/cake/cake.frosting)](https://dev.azure.com/cake-build/Cake/_packaging?_a=package&feed=cake&package=Cake.Frosting&protocolType=NuGet) ![Build](https://github.com/cake-build/frosting/workflows/Build/badge.svg?branch=develop) [![Build status](https://ci.appveyor.com/api/projects/status/hb62doomg0mgc0fx/branch/develop?svg=true)](https://ci.appveyor.com/project/cakebuild/frosting/branch/develop)
A .NET Core host for Cake, that allows you to write your build scripts as a
-(portable) console application (`netcoreapp2.0` or `net461`). Frosting is currently
-in pre-release / incubation.
-
-**Expect things to move around initially. Especially naming of things.**
+(portable) console application (`netcoreapp3.1` or `net461`).
## Table of Contents
@@ -21,7 +16,7 @@ in pre-release / incubation.
## Example
-### 1. Install .NET Core SDK 2.1.500 or later
+### 1. Install .NET Core SDK 3.1.301 or later
You can find the SDK at [https://dotnet.microsoft.com/download](https://dotnet.microsoft.com/download).
@@ -56,12 +51,12 @@ The above command is what you're expected to run from your bootstrapper.
### .NET Core SDK
To build from source, you will need to have
-[.NET Core SDK 2.1.4](https://dotnet.microsoft.com/download)
+[.NET Core SDK 3.1.301](https://dotnet.microsoft.com/download)
installed on your machine.
-### Visual Studio 2017 (optional)
+### Visual Studio 2019 (optional)
-If you want to develop using Visual Studio, then you need to use Visual Studio 2017 (15.2) or higher.
+If you want to develop using Visual Studio, then you need to use Visual Studio 2019 (16.6) or higher.
## Acknowledgement
@@ -81,11 +76,6 @@ each of the Cake developers with an
[Open Source License](https://www.jetbrains.com/support/community/#section=open-source)
for [ReSharper](https://www.jetbrains.com/resharper/) that helps with the development of Cake.
-The Cake Team would also like to say thank you to the guys at
-[MyGet](https://www.myget.org/) for their support in providing a Professional
-subscription which allows us to continue to push all of our pre-release
-editions of Cake NuGet packages for early consumption by the Cake community.
-
## Code of Conduct
This project has adopted the code of conduct defined by the
diff --git a/appveyor.yml b/appveyor.yml
index 530c9a8..f9c829b 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,13 +1,19 @@
# Image used
-image: Visual Studio 2019
+image:
+ - Visual Studio 2019
+ - Ubuntu
+
+environment:
+ APPVEYOR_YML_DISABLE_PS_LINUX: true
# Build script
init:
- - git config --global core.autocrlf true
+ - ps: git config --global core.autocrlf true
# Build script
build_script:
- - ps: .\build.ps1 -Target "AppVeyor"
+ - ps: .\build.ps1 --target="AppVeyor"
+ - sh: ./build.sh --target="AppVeyor"
# Tests
test: off
@@ -24,5 +30,4 @@ branches:
# Build cache
cache:
-- build.ps1
-- global.json
\ No newline at end of file
+- tools -> build.ps1, global.json, build.sh, build.config
\ No newline at end of file
diff --git a/build.config b/build.config
new file mode 100644
index 0000000..da9a3c7
--- /dev/null
+++ b/build.config
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+DOTNET_VERSION=3.1.301
diff --git a/build.ps1 b/build.ps1
index f691b99..8f9b465 100644
--- a/build.ps1
+++ b/build.ps1
@@ -1,39 +1,24 @@
-<#
-.SYNOPSIS
-This is a Powershell script to bootstrap a Cake build.
-.DESCRIPTION
-This Powershell script will download NuGet if missing, restore NuGet tools (including Cake)
-and execute your Cake build script with the parameters you provide.
-.PARAMETER Target
-The build script target to run.
-.PARAMETER Configuration
-The build configuration to use.
-.PARAMETER Verbosity
-Specifies the amount of information to be displayed.
-.PARAMETER WhatIf
-Performs a dry run of the build script.
-No tasks will be executed.
-.PARAMETER ScriptArgs
-Remaining arguments are added here.
-.LINK
-https://cakebuild.net
-#>
+#!/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)
+ }
+}
-[CmdletBinding()]
-Param(
- [string]$Target = "Default",
- [ValidateSet("Release", "Debug")]
- [string]$Configuration = "Release",
- [ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
- [string]$Verbosity = "Verbose",
- [switch]$WhatIf,
- [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
- [string[]]$ScriptArgs
-)
-$DotNetVersion = "2.1.807";
+if ([string]::IsNullOrEmpty($DotNetVersion)) {
+ 'Failed to parse .NET Core SDK Version'
+ exit 1
+}
+
$DotNetInstallerUri = "https://dot.net/v1/dotnet-install.ps1";
-$NugetUrl = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
# Make sure tools folder exists
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
@@ -77,44 +62,9 @@ if($FoundDotNetCliVersion -ne $DotNetVersion) {
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
}
-###########################################################################
-# INSTALL NUGET
-###########################################################################
-
-# Make sure nuget.exe exists.
-$NugetPath = Join-Path $ToolPath "nuget.exe"
-if (!(Test-Path $NugetPath)) {
- Write-Host "Downloading NuGet.exe..."
- (New-Object System.Net.WebClient).DownloadFile($NugetUrl, $NugetPath);
-}
-
###########################################################################
# RUN BUILD SCRIPT
###########################################################################
-# Build the argument list.
-$Arguments = @{
- target=$Target;
- configuration=$Configuration;
- verbosity=$Verbosity;
- dryrun=$WhatIf;
-}.GetEnumerator() | ForEach-Object { "--{0}=`"{1}`"" -f $_.key, $_.value };
-
-try {
- Push-Location
- Set-Location build
- Write-Host "Restoring packages..."
- Invoke-Expression "dotnet restore"
- if($LASTEXITCODE -eq 0) {
- Write-Output "Compiling build..."
- Invoke-Expression "dotnet publish -c Debug /v:q /nologo"
- if($LASTEXITCODE -eq 0) {
- Write-Output "Running build..."
- Invoke-Expression "bin/Debug/net461/publish/Build.exe $Arguments"
- }
- }
-}
-finally {
- Pop-Location
- exit $LASTEXITCODE;
-}
+dotnet run --project build/Build.csproj -- $args
+exit $LASTEXITCODE;
\ No newline at end of file
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..bd9974b
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+# Define varibles
+SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+source $SCRIPT_DIR/build.config
+
+if [ "$DOTNET_VERSION" = "" ]; then
+ echo "An error occured while parsing .NET Core SDK version."
+ exit 1
+fi
+
+###########################################################################
+# INSTALL .NET CORE CLI
+###########################################################################
+
+export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
+export DOTNET_CLI_TELEMETRY_OPTOUT=1
+export DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0
+export DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2
+
+DOTNET_INSTALLED_VERSION=$(dotnet --version 2>&1)
+
+if [ "$DOTNET_VERSION" != "$DOTNET_INSTALLED_VERSION" ]; then
+ echo "Installing .NET CLI..."
+ if [ ! -d "$SCRIPT_DIR/.dotnet" ]; then
+ mkdir "$SCRIPT_DIR/.dotnet"
+ fi
+ curl -Lsfo "$SCRIPT_DIR/.dotnet/dotnet-install.sh" https://dot.net/v1/dotnet-install.sh
+ bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --version $DOTNET_VERSION --install-dir .dotnet --no-path
+ export PATH="$SCRIPT_DIR/.dotnet":$PATH
+ export DOTNET_ROOT="$SCRIPT_DIR/.dotnet"
+fi
+
+###########################################################################
+# RUN BUILD SCRIPT
+###########################################################################
+
+echo "Running build script.."
+dotnet run --project ./build/Build.csproj -- "$@"
diff --git a/build/Build.csproj b/build/Build.csproj
index 72a73c5..53e57c2 100644
--- a/build/Build.csproj
+++ b/build/Build.csproj
@@ -2,11 +2,18 @@
Exe
- net461
+ netcoreapp3.0
+
+
+ $(MSBuildProjectDirectory)
+ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
+ true
+ true
-
+
+
diff --git a/build/Build.sln b/build/Build.sln
index fd552b9..9837460 100644
--- a/build/Build.sln
+++ b/build/Build.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26127.3
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30204.135
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build", "Build.csproj", "{0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}"
EndProject
@@ -17,18 +17,21 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Debug|x64.ActiveCfg = Debug|x64
- {0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Debug|x64.Build.0 = Debug|x64
- {0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Debug|x86.ActiveCfg = Debug|x86
- {0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Debug|x86.Build.0 = Debug|x86
+ {0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Debug|x64.Build.0 = Debug|Any CPU
+ {0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Debug|x86.Build.0 = Debug|Any CPU
{0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Release|Any CPU.Build.0 = Release|Any CPU
- {0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Release|x64.ActiveCfg = Release|x64
- {0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Release|x64.Build.0 = Release|x64
- {0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Release|x86.ActiveCfg = Release|x86
- {0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Release|x86.Build.0 = Release|x86
+ {0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Release|x64.ActiveCfg = Release|Any CPU
+ {0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Release|x64.Build.0 = Release|Any CPU
+ {0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Release|x86.ActiveCfg = Release|Any CPU
+ {0F5ED648-CEE0-47EB-8CDD-A881159B4F8E}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {062A93C5-869B-4AE7-8B68-B69E878C1507}
+ EndGlobalSection
EndGlobal
diff --git a/build/Context.cs b/build/Context.cs
index a587c33..2dcb564 100644
--- a/build/Context.cs
+++ b/build/Context.cs
@@ -13,14 +13,21 @@ public class Context : FrostingContext
public DirectoryPath Artifacts { get; set; }
- public string MyGetSource { get; set; }
- public string MyGetApiKey { get; set; }
-
+ public string AzureArtifactsSourceUrl { get; set; }
+ public string AzureArtifactsSourceName { get; set; }
+ public string AzureArtifactsPersonalAccessToken { get; set; }
+ public string AzureArtifactsSourceUserName { get; set; }
+
+ public string GitHubToken { get; set; }
+
public bool IsLocalBuild { get; set; }
public bool IsPullRequest { get; set; }
public bool IsOriginalRepo { get; set; }
+ public string RepositoryOwner { get; set; }
+ public string RepositoryName { get; set; }
public bool IsTagged { get; set; }
- public bool IsMasterBranch { get; set; }
+ public bool IsPrimaryBranch { get; set; }
+ public string PrimaryBranchName { get; set; }
public bool ForcePublish { get; set; }
public bool AppVeyor { get; set; }
@@ -31,4 +38,4 @@ public Context(ICakeContext context)
: base(context)
{
}
-}
\ No newline at end of file
+}
diff --git a/build/Lifetime.cs b/build/Lifetime.cs
index 6b64416..a98dc50 100644
--- a/build/Lifetime.cs
+++ b/build/Lifetime.cs
@@ -1,4 +1,5 @@
using System;
+using System.Linq;
using Cake.Common;
using Cake.Common.Diagnostics;
using Cake.Common.Build;
@@ -15,8 +16,11 @@ public override void Setup(Context context)
context.Target = context.Argument("target", "Default");
context.BuildConfiguration = context.Argument("configuration", "Release");
context.ForcePublish = context.Argument("forcepublish", false);
- context.MyGetSource = GetEnvironmentValueOrArgument(context, "FROSTING_MYGET_SOURCE", "mygetsource");
- context.MyGetApiKey = GetEnvironmentValueOrArgument(context, "FROSTING_MYGET_API_KEY", "mygetapikey");
+ context.AzureArtifactsSourceUrl = GetEnvironmentValueOrArgument(context, "FROSTING_AZURE_ARTIFACTS_SOURCE_URL", "azureartifactssourceurl");
+ context.AzureArtifactsPersonalAccessToken = GetEnvironmentValueOrArgument(context, "FROSTING_AZURE_ARTIFACTS_PERSONAL_ACCESS_TOKEN", "mygetapikey");
+ context.AzureArtifactsSourceName = GetEnvironmentValueOrArgument(context, "FROSTING_AZURE_ARTIFACTS_SOURCE_NAME", "azureartifactssourcename");
+ context.AzureArtifactsSourceUserName = GetEnvironmentValueOrArgument(context, "FROSTING_AZURE_ARTIFACTS_SOURCE_USER_NAME", "azureartifactssourceusername");
+ context.GitHubToken = GetEnvironmentValueOrArgument(context, "FROSTING_GITHUB_TOKEN", "githubtoken");
// Directories
context.Artifacts = new DirectoryPath("./artifacts");
@@ -26,14 +30,19 @@ public override void Setup(Context context)
context.AppVeyor = buildSystem.AppVeyor.IsRunningOnAppVeyor;
context.IsLocalBuild = buildSystem.IsLocalBuild;
context.IsPullRequest = buildSystem.AppVeyor.Environment.PullRequest.IsPullRequest;
- context.IsOriginalRepo = StringComparer.OrdinalIgnoreCase.Equals("cake-build/frosting", buildSystem.AppVeyor.Environment.Repository.Name);
+ context.PrimaryBranchName = "master";
+ context.RepositoryOwner = "cake-build";
+ context.RepositoryName = "frosting";
+ context.IsOriginalRepo = StringComparer.OrdinalIgnoreCase.Equals(string.Concat(context.RepositoryOwner, "/", context.RepositoryName), buildSystem.AppVeyor.Environment.Repository.Name);
context.IsTagged = IsBuildTagged(buildSystem);
- context.IsMasterBranch = StringComparer.OrdinalIgnoreCase.Equals("master", buildSystem.AppVeyor.Environment.Repository.Branch);
+ context.IsPrimaryBranch = StringComparer.OrdinalIgnoreCase.Equals(context.PrimaryBranchName, buildSystem.AppVeyor.Environment.Repository.Branch);
context.BuildSystem = buildSystem;
- // Install tools
- context.Information("Installing tools...");
- ToolInstaller.Install(context, "GitVersion.CommandLine", "4.0.0");
+ // Install Global .Net Tools
+ context.Information("Installing .Net Global Tools...");
+ context.DotNetCoreToolInstall("GitReleaseManager.Tool", "0.11.0", "dotnet-gitreleasemanager");
+ context.DotNetCoreToolInstall("SignClient", "1.2.109", "SignClient");
+ context.DotNetCoreToolInstall("GitVersion.Tool", "5.1.2", "dotnet-gitversion");
// Calculate semantic version.
context.Version = BuildVersion.Calculate(context);
@@ -46,6 +55,29 @@ public override void Setup(Context context)
.WithProperty("AssemblyVersion", context.Version.Version)
.WithProperty("FileVersion", context.Version.Version);
+ if(context.AppVeyor)
+ {
+ context.MSBuildSettings.WithProperty("ContinuousIntegrationBuild", "true");
+ }
+
+ if(!context.IsRunningOnWindows())
+ {
+ var frameworkPathOverride = context.Environment.Runtime.IsCoreClr
+ ? new []{
+ new DirectoryPath("/Library/Frameworks/Mono.framework/Versions/Current/lib/mono"),
+ new DirectoryPath("/usr/lib/mono"),
+ new DirectoryPath("/usr/local/lib/mono")
+ }
+ .Select(directory =>directory.Combine("4.5"))
+ .FirstOrDefault(directory => context.FileSystem.Exist(directory))
+ ?.FullPath + "/"
+ : new FilePath(typeof(object).Assembly.Location).GetDirectory().FullPath + "/";
+
+ // Use FrameworkPathOverride when not running on Windows.
+ context.Information("Build will use FrameworkPathOverride={0} since not building on Windows.", frameworkPathOverride);
+ context.MSBuildSettings.WithProperty("FrameworkPathOverride", frameworkPathOverride);
+ }
+
context.Information("Version: {0}", context.Version);
context.Information("Sem version: {0}", context.Version.SemVersion);
context.Information("Configuration: {0}", context.BuildConfiguration);
@@ -68,4 +100,4 @@ private static string GetEnvironmentValueOrArgument(Context context, string envi
}
return arg;
}
-}
\ No newline at end of file
+}
diff --git a/build/Tasks/AppVeyor.cs b/build/Tasks/AppVeyor.cs
index 7020728..649e6b8 100644
--- a/build/Tasks/AppVeyor.cs
+++ b/build/Tasks/AppVeyor.cs
@@ -1,11 +1,13 @@
using Cake.Frosting;
[Dependency(typeof(AppVeyorArtifacts))]
-[Dependency(typeof(PublishMyGet))]
+[Dependency(typeof(PublishAzureArtifacts))]
+[Dependency(typeof(PublishNuGet))]
+[Dependency(typeof(PublishGitHubRelease))]
public class AppVeyor : FrostingTask
{
public override bool ShouldRun(Context context)
{
return context.AppVeyor;
- }
-}
\ No newline at end of file
+ }
+}
diff --git a/build/Tasks/AppVeyorArtifacts.cs b/build/Tasks/AppVeyorArtifacts.cs
index 57dcdac..0ef5c21 100644
--- a/build/Tasks/AppVeyorArtifacts.cs
+++ b/build/Tasks/AppVeyorArtifacts.cs
@@ -5,6 +5,7 @@
using Cake.Frosting;
[Dependency(typeof(Package))]
+[Dependency(typeof(SignFiles))]
public class AppVeyorArtifacts : FrostingTask
{
public override bool ShouldRun(Context context)
@@ -15,20 +16,18 @@ public override bool ShouldRun(Context context)
public override void Run(Context context)
{
// Get the file paths.
- var root = new DirectoryPath("./src/Cake.Frosting");
var files = new[] {
$"./artifacts/Cake.Frosting.Template.{context.Version.SemVersion}.nupkg",
- $"./artifacts/Cake.Frosting.{context.Version.SemVersion}.nupkg",
- $"./artifacts/Cake.Frosting.{context.Version.SemVersion}.symbols.nupkg"
+ $"./artifacts/Cake.Frosting.{context.Version.SemVersion}.nupkg"
};
// Push files
- foreach(var file in files)
+ foreach(var file in files)
{
context.BuildSystem.AppVeyor.UploadArtifact(
file
);
}
}
-}
\ No newline at end of file
+}
diff --git a/build/Tasks/CreateReleaseNotes.cs b/build/Tasks/CreateReleaseNotes.cs
new file mode 100644
index 0000000..6b49cac
--- /dev/null
+++ b/build/Tasks/CreateReleaseNotes.cs
@@ -0,0 +1,25 @@
+using Cake.Common.Tools.GitReleaseManager;
+using Cake.Common.Tools.GitReleaseManager.Create;
+using Cake.Core;
+using Cake.Frosting;
+
+public class CreateReleaseNotes : FrostingTask
+{
+ public override void Run(Context context)
+ {
+ if (string.IsNullOrEmpty(context.GitHubToken))
+ {
+ throw new CakeException("GitHub Token was not provided.");
+ }
+
+ var settings = new GitReleaseManagerCreateSettings
+ {
+ Milestone = context.Version.Milestone,
+ Name = context.Version.Milestone,
+ TargetCommitish = context.PrimaryBranchName,
+ Prerelease = false
+ };
+
+ context.GitReleaseManagerCreate(context.GitHubToken, context.RepositoryOwner, context.RepositoryName, settings);
+ }
+}
diff --git a/build/Tasks/Package.cs b/build/Tasks/Package.cs
index 97ac716..b6e6eae 100644
--- a/build/Tasks/Package.cs
+++ b/build/Tasks/Package.cs
@@ -1,23 +1,22 @@
-using Cake.Common.Tools.DotNetCore;
-using Cake.Common.Tools.DotNetCore.Pack;
-using Cake.Core;
-using Cake.Core.IO;
-using Cake.Frosting;
-
-[Dependency(typeof(UnitTests))]
-[Dependency(typeof(PackageTemplate))]
-public class Package : FrostingTask
-{
- public override void Run(Context context)
- {
- var path = new FilePath("./src/Cake.Frosting/Cake.Frosting.csproj");
- context.DotNetCorePack(path.FullPath, new DotNetCorePackSettings {
- Configuration = context.BuildConfiguration,
- MSBuildSettings = context.MSBuildSettings,
- NoBuild = true,
- NoRestore = true,
- OutputDirectory = context.Artifacts,
- ArgumentCustomization = args => args.Append("--include-symbols --include-source")
- });
- }
+using Cake.Common.Tools.DotNetCore;
+using Cake.Common.Tools.DotNetCore.Pack;
+using Cake.Core;
+using Cake.Core.IO;
+using Cake.Frosting;
+
+[Dependency(typeof(UnitTests))]
+[Dependency(typeof(PackageTemplate))]
+public class Package : FrostingTask
+{
+ public override void Run(Context context)
+ {
+ var path = new FilePath("./src/Cake.Frosting/Cake.Frosting.csproj");
+ context.DotNetCorePack(path.FullPath, new DotNetCorePackSettings {
+ Configuration = context.BuildConfiguration,
+ MSBuildSettings = context.MSBuildSettings,
+ NoBuild = true,
+ NoRestore = true,
+ OutputDirectory = context.Artifacts
+ });
+ }
}
\ No newline at end of file
diff --git a/build/Tasks/PackageTemplate.cs b/build/Tasks/PackageTemplate.cs
index 6ca53d8..1eaf169 100644
--- a/build/Tasks/PackageTemplate.cs
+++ b/build/Tasks/PackageTemplate.cs
@@ -1,7 +1,8 @@
-using System.Collections.Generic;
-using Cake.Common.Tools.NuGet;
-using Cake.Common.Tools.NuGet.Pack;
+using Cake.Common.Tools.DotNetCore;
+using Cake.Common.Tools.DotNetCore.MSBuild;
+using Cake.Common.Tools.DotNetCore.Pack;
using Cake.Common.Xml;
+using Cake.Core.IO;
using Cake.Frosting;
public class PackageTemplate : FrostingTask
@@ -11,17 +12,19 @@ public override void Run(Context context)
if (context.AppVeyor)
{
context.XmlPoke(
- "./template/Build.csproj",
+ "./template/templates/cakefrosting/build/Build.csproj",
"/Project/ItemGroup/PackageReference[@Include = 'Cake.Frosting']/@Version",
context.Version.SemVersion
);
}
- context.NuGetPack("./template/Cake.Frosting.Template.nuspec", new NuGetPackSettings
+ var path = new FilePath("./template/Cake.Frosting.Template.csproj");
+ context.DotNetCorePack(path.FullPath, new DotNetCorePackSettings
{
- Version = context.Version.SemVersion,
- OutputDirectory = context.Artifacts,
- NoPackageAnalysis = true
+ Configuration = context.BuildConfiguration,
+ MSBuildSettings = new DotNetCoreMSBuildSettings()
+ .WithProperty("Version", context.Version.SemVersion),
+ OutputDirectory = context.Artifacts
});
}
-}
\ No newline at end of file
+}
diff --git a/build/Tasks/PublishAzureArtifacts.cs b/build/Tasks/PublishAzureArtifacts.cs
new file mode 100644
index 0000000..e9209c7
--- /dev/null
+++ b/build/Tasks/PublishAzureArtifacts.cs
@@ -0,0 +1,65 @@
+using Cake.Common.Tools.NuGet;
+using Cake.Common.Tools.NuGet.Push;
+using Cake.Common.Tools.NuGet.Sources;
+using Cake.Core;
+using Cake.Core.IO;
+using Cake.Frosting;
+
+[Dependency(typeof(Package))]
+[Dependency(typeof(AppVeyorArtifacts))]
+public class PublishAzureArtifacts : FrostingTask
+{
+ public override bool ShouldRun(Context context)
+ {
+ return
+ !context.IsLocalBuild &&
+ !context.IsPullRequest &&
+ context.IsOriginalRepo &&
+ context.BuildSystem.IsRunningOnAppVeyor &&
+ context.Environment.Platform.Family == PlatformFamily.Windows &&
+ (context.IsTagged || !context.IsPrimaryBranch);
+ }
+
+ public override void Run(Context context)
+ {
+ if(context.AzureArtifactsSourceUrl == null)
+ {
+ throw new CakeException("Azure Artifacts source URL was not provided.");
+ }
+ if(context.AzureArtifactsSourceName == null)
+ {
+ throw new CakeException("Azure Artifacts source name was not provided.");
+ }
+ if(context.AzureArtifactsPersonalAccessToken == null)
+ {
+ throw new CakeException("Azure Artifacts Personal Access Token was not provided.");
+ }
+ if(context.AzureArtifactsSourceUserName == null)
+ {
+ throw new CakeException("Azure Artifacts username was not provided.");
+ }
+
+ // Get the file paths.
+ var files = new[] {
+ $"./artifacts/Cake.Frosting.Template.{context.Version.SemVersion}.nupkg",
+ $"./artifacts/Cake.Frosting.{context.Version.SemVersion}.nupkg"
+ };
+
+ if(!context.NuGetHasSource(context.AzureArtifactsSourceName))
+ {
+ context.NuGetAddSource(context.AzureArtifactsSourceName, context.AzureArtifactsSourceUrl, new NuGetSourcesSettings{
+ UserName = context.AzureArtifactsSourceUserName,
+ Password = context.AzureArtifactsPersonalAccessToken
+ });
+ }
+
+ // Push files
+ foreach(var file in files)
+ {
+ context.NuGetPush(file, new NuGetPushSettings {
+ Source = context.AzureArtifactsSourceName,
+ ApiKey = "az"
+ });
+ }
+ }
+}
diff --git a/build/Tasks/PublishGitHubRelease.cs b/build/Tasks/PublishGitHubRelease.cs
new file mode 100644
index 0000000..896ef9a
--- /dev/null
+++ b/build/Tasks/PublishGitHubRelease.cs
@@ -0,0 +1,42 @@
+using Cake.Common.Tools.GitReleaseManager;
+using Cake.Core;
+using Cake.Core.IO;
+using Cake.Frosting;
+
+[Dependency(typeof(Package))]
+[Dependency(typeof(PublishNuGet))]
+public class PublishGitHubRelease : FrostingTask
+{
+ public override bool ShouldRun(Context context)
+ {
+ return !context.IsLocalBuild &&
+ !context.IsPullRequest &&
+ context.IsOriginalRepo &&
+ context.IsPrimaryBranch &&
+ context.BuildSystem.IsRunningOnAppVeyor &&
+ context.Environment.Platform.Family == PlatformFamily.Windows &&
+ context.IsTagged;
+ }
+
+ public override void Run(Context context)
+ {
+ if (string.IsNullOrEmpty(context.GitHubToken))
+ {
+ throw new CakeException("GitHub Token was not provided.");
+ }
+
+ // Get the file paths.
+ var files = new[] {
+ $"./artifacts/Cake.Frosting.Template.{context.Version.SemVersion}.nupkg",
+ $"./artifacts/Cake.Frosting.{context.Version.SemVersion}.nupkg"
+ };
+
+ // Concatenating FilePathCollections should make sure we get unique FilePaths
+ foreach (var file in files)
+ {
+ context.GitReleaseManagerAddAssets(context.GitHubToken, context.RepositoryOwner, context.RepositoryName, context.Version.Milestone, file);
+ }
+
+ context.GitReleaseManagerClose(context.GitHubToken, context.RepositoryOwner, context.RepositoryName, context.Version.Milestone);
+ }
+}
diff --git a/build/Tasks/PublishMyGet.cs b/build/Tasks/PublishMyGet.cs
deleted file mode 100644
index 7b382d7..0000000
--- a/build/Tasks/PublishMyGet.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-using Cake.Common.Tools.NuGet;
-using Cake.Common.Tools.NuGet.Push;
-using Cake.Core;
-using Cake.Core.IO;
-using Cake.Frosting;
-
-[Dependency(typeof(Package))]
-[Dependency(typeof(AppVeyorArtifacts))]
-public class PublishMyGet : FrostingTask
-{
- public override bool ShouldRun(Context context)
- {
- return !context.IsLocalBuild && !context.IsPullRequest && context.IsOriginalRepo
- && (context.IsTagged || !context.IsMasterBranch);
- }
-
- public override void Run(Context context)
- {
- if(context.MyGetSource == null)
- {
- throw new CakeException("MyGet source was not provided.");
- }
- if(context.MyGetApiKey == null)
- {
- throw new CakeException("MyGet API key was not provided.");
- }
-
- // Get the file paths.
- var root = new DirectoryPath("./src/Cake.Frosting");
- var files = new[] {
- $"./artifacts/Cake.Frosting.Template.{context.Version.SemVersion}.nupkg",
- $"./artifacts/Cake.Frosting.{context.Version.SemVersion}.nupkg",
- $"./artifacts/Cake.Frosting.{context.Version.SemVersion}.symbols.nupkg"
- };
-
- // Push files
- foreach(var file in files)
- {
- context.NuGetPush(file, new NuGetPushSettings {
- Source = context.MyGetSource,
- ApiKey = context.MyGetApiKey
- });
- }
- }
-}
\ No newline at end of file
diff --git a/build/Tasks/PublishNuGet.cs b/build/Tasks/PublishNuGet.cs
new file mode 100644
index 0000000..e32357d
--- /dev/null
+++ b/build/Tasks/PublishNuGet.cs
@@ -0,0 +1,52 @@
+using System;
+using Cake.Common;
+using Cake.Common.Tools.NuGet;
+using Cake.Common.Tools.NuGet.Push;
+using Cake.Core;
+using Cake.Frosting;
+
+[Dependency(typeof(Package))]
+[Dependency(typeof(PublishAzureArtifacts))]
+public class PublishNuGet : FrostingTask
+{
+ public override bool ShouldRun(Context context)
+ {
+ return !context.IsLocalBuild &&
+ !context.IsPullRequest &&
+ context.IsOriginalRepo &&
+ context.IsPrimaryBranch &&
+ context.BuildSystem.IsRunningOnAppVeyor &&
+ context.Environment.Platform.Family == PlatformFamily.Windows &&
+ context.IsTagged;
+ }
+
+ public override void Run(Context context)
+ {
+ // Resolve the API key.
+ var apiKey = context.EnvironmentVariable("NUGET_API_KEY");
+ if(string.IsNullOrEmpty(apiKey)) {
+ throw new InvalidOperationException("Could not resolve NuGet API key.");
+ }
+
+ // Get the packages...
+ var packages = new[] {
+ $"./artifacts/Cake.Frosting.Template.{context.Version.SemVersion}.nupkg",
+ $"./artifacts/Cake.Frosting.{context.Version.SemVersion}.nupkg",
+ };
+
+ // Resolve the API url.
+ var apiUrl = context.EnvironmentVariable("NUGET_API_URL");
+ if(string.IsNullOrEmpty(apiUrl)) {
+ throw new InvalidOperationException("Could not resolve NuGet API url.");
+ }
+
+ foreach(var package in packages)
+ {
+ // Push the package.
+ context.NuGetPush(package, new NuGetPushSettings {
+ ApiKey = apiKey,
+ Source = apiUrl
+ });
+ }
+ }
+}
diff --git a/build/Tasks/SignFiles.cs b/build/Tasks/SignFiles.cs
new file mode 100644
index 0000000..58b1c96
--- /dev/null
+++ b/build/Tasks/SignFiles.cs
@@ -0,0 +1,72 @@
+using System;
+using System.Linq;
+using Cake.Common;
+using Cake.Common.Diagnostics;
+using Cake.Common.IO;
+using Cake.Core;
+using Cake.Core.IO;
+using Cake.Frosting;
+
+[Dependency(typeof(Package))]
+public class SignFiles : FrostingTask
+{
+ public override bool ShouldRun(Context context)
+ {
+ return (!context.IsLocalBuild &&
+ !context.IsPullRequest &&
+ context.IsOriginalRepo &&
+ context.IsPrimaryBranch &&
+ context.IsTagged) ||
+ StringComparer.OrdinalIgnoreCase.Equals(context.EnvironmentVariable("SIGNING_TEST"), "True");
+ }
+
+ public override void Run(Context context)
+ {
+ var signClientPath = context.Tools.Resolve("SignClient.exe") ?? context.Tools.Resolve("SignClient") ?? throw new Exception("Failed to locate sign tool");
+
+ // Get the secret.
+ var secret = context.EnvironmentVariable("SIGNING_SECRET");
+ if(string.IsNullOrWhiteSpace(secret)) {
+ throw new InvalidOperationException("Could not resolve signing secret.");
+ }
+ // Get the user.
+ var user = context.EnvironmentVariable("SIGNING_USER");
+ if(string.IsNullOrWhiteSpace(user)) {
+ throw new InvalidOperationException("Could not resolve signing user.");
+ }
+
+ var settings = new FilePath("./signclient.json");
+ var filter = new FilePath("./signclient.filter");
+
+ // Get the files to sign.
+ var files = new[] {
+ $"./artifacts/Cake.Frosting.Template.{context.Version.SemVersion}.nupkg",
+ $"./artifacts/Cake.Frosting.{context.Version.SemVersion}.nupkg"
+ };
+
+ foreach(var file in files)
+ {
+ context.Information("Signing {0}...", file);
+
+ // Build the argument list.
+ var arguments = new ProcessArgumentBuilder()
+ .Append("sign")
+ .AppendSwitchQuoted("-c", context.MakeAbsolute(settings).FullPath)
+ .AppendSwitchQuoted("-i", context.MakeAbsolute(((FilePath)file)).FullPath)
+ .AppendSwitchQuoted("-f", context.MakeAbsolute(filter).FullPath)
+ .AppendSwitchQuotedSecret("-s", secret)
+ .AppendSwitchQuotedSecret("-r", user)
+ .AppendSwitchQuoted("-n", "Cake")
+ .AppendSwitchQuoted("-d", "Cake (C# Make) is a cross platform build automation system.")
+ .AppendSwitchQuoted("-u", "https://cakebuild.net");
+
+ // Sign the binary.
+ var result = context.StartProcess(signClientPath.FullPath, new ProcessSettings { Arguments = arguments });
+ if(result != 0)
+ {
+ // We should not recover from this.
+ throw new InvalidOperationException("Signing failed!");
+ }
+ }
+ }
+}
diff --git a/build/Tasks/UnitTests.cs b/build/Tasks/UnitTests.cs
index 84e2463..3d49647 100644
--- a/build/Tasks/UnitTests.cs
+++ b/build/Tasks/UnitTests.cs
@@ -7,10 +7,16 @@ public class UnitTests : FrostingTask
{
public override void Run(Context context)
{
- var project = "./src/Cake.Frosting.Tests/Cake.Frosting.Tests.csproj";
- context.DotNetCoreTest(project, new DotNetCoreTestSettings {
- Configuration = context.BuildConfiguration,
- NoBuild = true
- });
+ foreach(var framework in new[] { "netcoreapp2.1", "netcoreapp3.0", "net461" })
+ {
+ var project = "./src/Cake.Frosting.Tests/Cake.Frosting.Tests.csproj";
+
+ context.DotNetCoreTest(project, new DotNetCoreTestSettings {
+ Framework = framework,
+ Configuration = context.BuildConfiguration,
+ NoBuild = true,
+ NoRestore = true
+ });
+ }
}
-}
\ No newline at end of file
+}
diff --git a/build/Utilities/BuildVersion.cs b/build/Utilities/BuildVersion.cs
index adc7e0c..f648c8a 100644
--- a/build/Utilities/BuildVersion.cs
+++ b/build/Utilities/BuildVersion.cs
@@ -7,42 +7,55 @@ public class BuildVersion
{
public string Version { get; set; }
public string SemVersion { get; set; }
+ public string Milestone { get; private set; }
+ public string InformationalVersion { get; private set; }
+ public string FullSemVersion { get; private set; }
+ public string AssemblySemVer { get; private set; }
- public BuildVersion(string version, string semVersion)
+ public BuildVersion(string version, string semVersion, string informationalVersion, string assemblySemVer, string milestone, string fullSemVersion)
{
Version = version;
SemVersion = semVersion;
+ InformationalVersion = informationalVersion;
+ AssemblySemVer = assemblySemVer;
+ Milestone = milestone;
+ FullSemVersion = fullSemVersion;
}
public static BuildVersion Calculate(Context context)
{
string version = null;
string semVersion = null;
+ string milestone = null;
+ string informationalVersion = null;
+ string assemblySemVer = null;
+ string fullSemVersion = null;
- if (context.IsRunningOnWindows())
+ context.Information("Calculating semantic version...");
+ if (!context.IsLocalBuild)
{
- context.Information("Calculating semantic version...");
- if (!context.IsLocalBuild)
+ context.GitVersion(new GitVersionSettings
{
- context.GitVersion(new GitVersionSettings
- {
- OutputType = GitVersionOutput.BuildServer
- });
- }
-
- GitVersion assertedVersions = context.GitVersion(new GitVersionSettings
- {
- OutputType = GitVersionOutput.Json
+ OutputType = GitVersionOutput.BuildServer
});
- version = assertedVersions.MajorMinorPatch;
- semVersion = assertedVersions.LegacySemVerPadded;
}
+ GitVersion assertedVersions = context.GitVersion(new GitVersionSettings
+ {
+ OutputType = GitVersionOutput.Json
+ });
+ version = assertedVersions.MajorMinorPatch;
+ semVersion = assertedVersions.LegacySemVerPadded;
+ informationalVersion = assertedVersions.InformationalVersion;
+ assemblySemVer = assertedVersions.AssemblySemVer;
+ milestone = string.Concat("v", version);
+ fullSemVersion = assertedVersions.FullSemVer;
+
if (string.IsNullOrWhiteSpace(version))
{
throw new CakeException("Could not calculate version of build.");
}
- return new BuildVersion(version, semVersion);
+ return new BuildVersion(version, semVersion, informationalVersion, assemblySemVer, milestone, fullSemVersion);
}
-}
\ No newline at end of file
+}
diff --git a/build/Utilities/ToolInstaller.cs b/build/Utilities/ToolInstaller.cs
index 39248e4..e68364c 100644
--- a/build/Utilities/ToolInstaller.cs
+++ b/build/Utilities/ToolInstaller.cs
@@ -1,15 +1,65 @@
-using Cake.Common.Tools.NuGet;
-using Cake.Common.Tools.NuGet.Install;
+using Cake.Common.IO;
+using Cake.Common.Tools.DotNetCore;
+using Cake.Common.Tools.DotNetCore.Tool;
using Cake.Core;
+using Cake.Core.IO;
public static class ToolInstaller
{
- public static void Install(ICakeContext context, string package, string version)
+ private static DirectoryPath ToolsPath { get; } = "./tools";
+
+ public static FilePath DotNetCoreToolInstall(
+ this ICakeContext context,
+ string package,
+ string version,
+ string toolName)
{
- context.NuGetInstall(package, new NuGetInstallSettings {
- Version = version,
- ExcludeVersion = true,
- OutputDirectory = "./tools"
- });
+ context.EnsureDirectoryExists(ToolsPath);
+
+ var toolsPath = context.MakeAbsolute(ToolsPath);
+
+ var toolInstallPath = toolsPath
+ .Combine(".store")
+ .Combine(package.ToLowerInvariant())
+ .Combine(version.ToLowerInvariant());
+
+ var toolPath = toolsPath.CombineWithFilePath(
+ string.Concat(
+ toolName,
+ context.Environment.Platform.IsUnix()
+ ? string.Empty
+ : ".exe"
+ )
+ );
+
+ if (!context.DirectoryExists(toolInstallPath) && context.FileExists(toolPath))
+ {
+ context.DotNetCoreTool("tool", new DotNetCoreToolSettings
+ {
+ ArgumentCustomization = args => args
+ .Append("uninstall")
+ .AppendSwitchQuoted("--tool-path", toolsPath.FullPath)
+ .AppendQuoted(package)
+ });
+ }
+
+ if (!context.FileExists(toolPath))
+ {
+ context.DotNetCoreTool("tool", new DotNetCoreToolSettings
+ {
+ ArgumentCustomization = args => args
+ .Append("install")
+ .AppendSwitchQuoted("--version", version)
+ .AppendSwitchQuoted("--tool-path", toolsPath.FullPath)
+ .AppendQuoted(package)
+ });
+ }
+
+ if (!context.FileExists(toolPath))
+ {
+ throw new System.Exception($"Failed to install .NET Core tool {package} ({version}).");
+ }
+
+ return toolPath;
}
-}
\ No newline at end of file
+}
diff --git a/build/global.json b/build/global.json
index 3789e80..acbfc84 100644
--- a/build/global.json
+++ b/build/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "2.1.807",
+ "version": "3.1.301",
"rollForward": "latestMajor"
}
}
diff --git a/global.json b/global.json
index 3c913e7..6e90c94 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "2.1.807",
+ "version": "3.1.301",
"rollForward": "latestMajor"
}
}
diff --git a/signclient.filter b/signclient.filter
new file mode 100644
index 0000000..0906d37
--- /dev/null
+++ b/signclient.filter
@@ -0,0 +1 @@
+**/Cake.*
diff --git a/signclient.json b/signclient.json
new file mode 100644
index 0000000..fe1c8c9
--- /dev/null
+++ b/signclient.json
@@ -0,0 +1,13 @@
+{
+ "SignClient": {
+ "AzureAd": {
+ "AADInstance": "https://login.microsoftonline.com/",
+ "ClientId": "c248d68a-ba6f-4aa9-8a68-71fe872063f8",
+ "TenantId": "16076fdc-fcc1-4a15-b1ca-32c9a255900e"
+ },
+ "Service": {
+ "Url": "https://codesign.dotnetfoundation.org/",
+ "ResourceId": "https://SignService/3c30251f-36f3-490b-a955-520addb85001"
+ }
+ }
+}
diff --git a/src/Cake.Frosting.Example/Cake.Frosting.Example.csproj b/src/Cake.Frosting.Example/Cake.Frosting.Example.csproj
index a69c2a7..0f4f821 100644
--- a/src/Cake.Frosting.Example/Cake.Frosting.Example.csproj
+++ b/src/Cake.Frosting.Example/Cake.Frosting.Example.csproj
@@ -1,23 +1,16 @@
- Copyright (c) .NET Foundation and contributors
- Patrik Svensson, Mattias Karlsson, Gary Ewan Park, Alistair Chapman, Martin Björkström and contributors
- Cake;Build;Build automation
- https://raw.githubusercontent.com/cake-build/graphics/master/png/cake-medium.png
- https://github.com/cake-build/frosting/blob/develop/LICENSE
- git
- https://github.com/cake-build/frosting
- 0.1.0
- net461;netcoreapp2.0
+ net461;netcoreapp2.0;netcoreapp2.1;netcoreapp3.0
Cake.Frosting.Example
Exe
- Cake.Frosting.Example
- false
- false
- false
7
+ true
+
+
+
-
\ No newline at end of file
+
+
diff --git a/src/Cake.Frosting.Tests/Cake.Frosting.Tests.csproj b/src/Cake.Frosting.Tests/Cake.Frosting.Tests.csproj
index 5b9fabe..ad8e77e 100644
--- a/src/Cake.Frosting.Tests/Cake.Frosting.Tests.csproj
+++ b/src/Cake.Frosting.Tests/Cake.Frosting.Tests.csproj
@@ -1,36 +1,40 @@
-
+
- Copyright (c) .NET Foundation and contributors
- Patrik Svensson, Mattias Karlsson, Gary Ewan Park, Alistair Chapman, Martin Björkström and contributors
- Cake;Build;Build automation
- https://raw.githubusercontent.com/cake-build/graphics/master/png/cake-medium.png
- https://github.com/cake-build/frosting/blob/develop/LICENSE
- git
- https://github.com/cake-build/frosting
- net461;netcoreapp2.0
+ net461;netcoreapp2.1;netcoreapp3.0
7
-
- $(DefineConstants);NETCORE
- portable
-
+
-
-
-
-
-
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/src/Cake.Frosting/Cake.Frosting.csproj b/src/Cake.Frosting/Cake.Frosting.csproj
index af499f5..fc6583e 100644
--- a/src/Cake.Frosting/Cake.Frosting.csproj
+++ b/src/Cake.Frosting/Cake.Frosting.csproj
@@ -1,37 +1,19 @@
-
-
- Cake.Frosting
- The .NET Core host for Cake.
- Copyright (c) .NET Foundation and contributors
- Patrik Svensson, Mattias Karlsson, Gary Ewan Park, Alistair Chapman, Martin Björkström and contributors
- Cake;Build;Build automation
- cake-medium.png
- MIT
- git
- https://github.com/cake-build/frosting
- 0.1.0
- netstandard2.0;net461
- true
- Cake.Frosting
- false
- false
- false
- 7.2
-
-
- $(DefineConstants);NETCORE
- portable
-
-
-
-
-
-
-
-
-
-
-
- true
-
-
\ No newline at end of file
+
+
+ The .NET Core host for Cake.
+ net461;netstandard2.0
+ true
+ Cake.Frosting
+ 7.2
+
+
+
+
+
+
+
+
+
+ true
+
+
diff --git a/src/Shared.msbuild b/src/Shared.msbuild
new file mode 100644
index 0000000..3a9a847
--- /dev/null
+++ b/src/Shared.msbuild
@@ -0,0 +1,44 @@
+
+
+ 0.1.0
+ $(AssemblyName)
+ Copyright (c) .NET Foundation and contributors
+ Patrik Svensson, Mattias Karlsson, Gary Ewan Park, Alistair Chapman, Martin Björkström, Dave Glick, Pascal Berger, Jérémie Desautels, Enrico Campidoglio and contributors
+ Patrik Svensson, Mattias Karlsson, Gary Ewan Park, Alistair Chapman, Martin Björkström, Dave Glick, Pascal Berger, Jérémie Desautels, Enrico Campidoglio and contributors
+ MIT
+ cake-medium.png
+ https://raw.githubusercontent.com/cake-build/graphics/master/png/cake-medium.png
+ Cake;Script;Build
+ https://cakebuild.net
+ https://github.com/cake-build/frosting.git
+ git
+ false
+ false
+ false
+ true
+ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
+ true
+
+
+
+ $(DefineConstants);NETCORE
+ portable
+
+
+
+ ../
+ ../../
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/template/Build.csproj b/template/Build.csproj
deleted file mode 100644
index f78a2ec..0000000
--- a/template/Build.csproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/template/Cake.Frosting.Template.csproj b/template/Cake.Frosting.Template.csproj
new file mode 100644
index 0000000..d8d0fa1
--- /dev/null
+++ b/template/Cake.Frosting.Template.csproj
@@ -0,0 +1,26 @@
+
+
+
+ Template
+ Cake.Frosting.Template
+ Cake.Frosting templates for the .NET SDK.
+ Cake.Frosting templates for the .NET SDK.
+ netcoreapp3.1
+
+ true
+ false
+ content
+ NU5110;NU5111;NU5128
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/template/Cake.Frosting.Template.nuspec b/template/Cake.Frosting.Template.nuspec
deleted file mode 100644
index a5adb17..0000000
--- a/template/Cake.Frosting.Template.nuspec
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
- Cake.Frosting.Template
- Cake.Frosting templates for the .NET SDK.
- Cake (C# Make) is a build automation system with a C# DSL to do things like compiling code, copy files/folders, running unit tests, compress files and build NuGet packages.
- Patrik Svensson, Mattias Karlsson, Gary Ewan Park, Alistair Chapman, Martin Björkström and contributors
- MIT
- https://github.com/cake-build/frosting
- cake-medium.png
- https://raw.githubusercontent.com/cake-build/graphics/master/png/cake-medium.png
- false
- Copyright (c) .NET Foundation and contributors
- Cake Script Build
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/template/build.ps1 b/template/build.ps1
deleted file mode 100644
index bc8fea0..0000000
--- a/template/build.ps1
+++ /dev/null
@@ -1,120 +0,0 @@
-<#
-.SYNOPSIS
-This is a Powershell script to bootstrap a Cake.Frosting build.
-.DESCRIPTION
-This Powershell script will download NuGet if missing, restore NuGet tools (including Cake)
-and execute your Cake build script with the parameters you provide.
-.PARAMETER Target
-The build script target to run.
-.PARAMETER Configuration
-The build configuration to use.
-.PARAMETER Verbosity
-Specifies the amount of information to be displayed.
-.PARAMETER WhatIf
-Performs a dry run of the build script.
-No tasks will be executed.
-.PARAMETER ScriptArgs
-Remaining arguments are added here.
-.LINK
-https://github.com/cake-build/frosting
-#>
-
-[CmdletBinding()]
-Param(
- [string]$Target = "Default",
- [ValidateSet("Release", "Debug")]
- [string]$Configuration = "Release",
- [ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
- [string]$Verbosity = "Verbose",
- [switch]$WhatIf,
- [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
- [string[]]$ScriptArgs
-)
-
-$DotNetVersion = "1.0.4";
-$DotNetInstallerUri = "https://dot.net/v1/dotnet-install.ps1";
-$NugetUrl = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
-
-# 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
-}
-
-###########################################################################
-# INSTALL NUGET
-###########################################################################
-
-# Make sure nuget.exe exists.
-$NugetPath = Join-Path $ToolPath "nuget.exe"
-if (!(Test-Path $NugetPath)) {
- Write-Host "Downloading NuGet.exe..."
- (New-Object System.Net.WebClient).DownloadFile($NugetUrl, $NugetPath);
-}
-
-###########################################################################
-# RUN BUILD SCRIPT
-###########################################################################
-
-# Build the argument list.
-$Arguments = @{
- target=$Target;
- configuration=$Configuration;
- verbosity=$Verbosity;
- dryrun=$WhatIf;
-}.GetEnumerator() | ForEach-Object { "--{0}=`"{1}`"" -f $_.key, $_.value };
-
-try {
- Push-Location
- Set-Location build
- Write-Host "Restoring packages..."
- Invoke-Expression "dotnet restore"
- if($LASTEXITCODE -eq 0) {
- Write-Output "Compiling build..."
- Invoke-Expression "dotnet publish -c Debug /v:q /nologo"
- if($LASTEXITCODE -eq 0) {
- Write-Output "Running build..."
- Invoke-Expression "dotnet bin/Debug/netcoreapp1.1/publish/Build.dll $Arguments"
- }
- }
-}
-finally {
- Pop-Location
- exit $LASTEXITCODE;
-}
diff --git a/template/.template.config/template.json b/template/templates/cakefrosting/.template.config/template.json
similarity index 100%
rename from template/.template.config/template.json
rename to template/templates/cakefrosting/.template.config/template.json
diff --git a/template/templates/cakefrosting/build/Build.csproj b/template/templates/cakefrosting/build/Build.csproj
new file mode 100644
index 0000000..9a16e83
--- /dev/null
+++ b/template/templates/cakefrosting/build/Build.csproj
@@ -0,0 +1,16 @@
+
+
+
+ Exe
+ netcoreapp3.1
+ true
+
+
+ $(MSBuildProjectDirectory)
+
+
+
+
+
+
+
diff --git a/template/Context.cs b/template/templates/cakefrosting/build/Context.cs
similarity index 100%
rename from template/Context.cs
rename to template/templates/cakefrosting/build/Context.cs
diff --git a/template/Lifetime.cs b/template/templates/cakefrosting/build/Lifetime.cs
similarity index 100%
rename from template/Lifetime.cs
rename to template/templates/cakefrosting/build/Lifetime.cs
diff --git a/template/Program.cs b/template/templates/cakefrosting/build/Program.cs
similarity index 100%
rename from template/Program.cs
rename to template/templates/cakefrosting/build/Program.cs
diff --git a/template/Tasks/Default.cs b/template/templates/cakefrosting/build/Tasks/Default.cs
similarity index 100%
rename from template/Tasks/Default.cs
rename to template/templates/cakefrosting/build/Tasks/Default.cs
diff --git a/template/Tasks/Hello.cs b/template/templates/cakefrosting/build/Tasks/Hello.cs
similarity index 100%
rename from template/Tasks/Hello.cs
rename to template/templates/cakefrosting/build/Tasks/Hello.cs