Skip to content

Commit

Permalink
Merge branch 'release/0.18.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
devlead committed Mar 7, 2017
2 parents 1cf2c36 + 66af447 commit 585fcc5
Show file tree
Hide file tree
Showing 292 changed files with 13,794 additions and 6,262 deletions.
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ dotnet-install.sh*
launchSettings.json
project.lock.json

# Rider
.idea/

# Build related
build-results/
tools/Cake/
Expand Down
12 changes: 12 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
image: devlead/gitlabs-dotnet
stages:
- build

build_job:
stage: build
script:
- ln -s /opt/dotnet .dotnet
- mkdir tools
- ln -s /opt/nuget/nuget.exe ./tools
- mono ./tools/nuget.exe install Cake -OutputDirectory ./tools -ExcludeVersion
- mono ./tools/Cake/Cake.exe build.cake --target="Run-Unit-Tests"
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ Cake (C# Make) is a build automation system with a C# DSL to do things like comp
| TeamCity | Windows | [![TeamCity Build Status](http://img.shields.io/teamcity/codebetter/Cake_CakeMaster.svg)](http://teamcity.codebetter.com/viewType.html?buildTypeId=Cake_CakeMaster) | |
| Bitrise | OS X | ![Bitrise Build Status](https://www.bitrise.io/app/7a9d707b00881436.svg?token=m8zsF3tNONLaF03eHU-Ftg&branch=develop) | ![Build Status](https://www.bitrise.io/app/804b431c1f27e0a0.svg?token=qKosHEaJAJEqzZcq4s5WRg&branch=develop) |
| Bitrise | Linux | ![Bitrise Build Status](https://www.bitrise.io/app/b811c91a26b1ea80.svg?token=zdwab0niOTRF4p3HcFYaxQ&branch=develop) | ![Build Status](https://www.bitrise.io/app/5a406f34f22113c6.svg?token=TQPbsmA9yP-iJOhzunIP4w&branch=develop) |
| Jenkins | Windows | [![Jenkins](https://img.shields.io/jenkins/s/https/cake-jenkins.azurewebsites.net/Cake.svg)](http://cake-jenkins.azurewebsites.net/job/Cake/lastStableBuild/) | |
| Bamboo | Windows | [![Bamboo Build Status](https://bambooshield.azurewebsites.net/planstatus/Flat/CAKE-CAKE.svg)](https://cakebuild.atlassian.net/builds/browse/CAKE-CAKE) | |
| Jenkins | Windows | [![Jenkins](https://img.shields.io/jenkins/s/https/cakejenkins.azurewebsites.net/Cake.svg)](https://cakejenkins.azurewebsites.net/job/Cake/lastStableBuild/) | |
| Bamboo | Windows | [![Bamboo Build Status](https://cakebambooshield.azurewebsites.net/planstatus/Flat/CAKE-CAKE.svg)](https://bamboo.devlead.se/browse/CAKE-CAKE/latest) | [![Bamboo Build Status](https://cakebambooshield.azurewebsites.net/planstatus/Flat/CAKE-IT.svg)](https://bamboo.devlead.se/browse/CAKE-IT/latest) |
| Visual Studio Team Services | Windows | ![VSTS Build Status](https://img.shields.io/vso/build/cake-build/af63183c-ac1f-4dbb-93bc-4fa862ea5809/1.svg) | |
| MyGet Build Services | Windows | [![MyGet Build Status](https://www.myget.org/BuildSource/Badge/cake-myget-build-service?identifier=53513546-050e-45de-9500-f161c99df6e2)](https://www.myget.org/) |   |
| Bitbucket Pipelines | Linux | [![Build Status](https://bitbucketshield.azurewebsites.net/status/cakebuild/cake-integration-tests/develop)](https://bitbucketshield.azurewebsites.net/url/cakebuild/cake-integration-tests/develop) | [![Build Status](https://bitbucketshield.azurewebsites.net/status/cakebuild/cake-integration-tests/IntegrationTests_develop)](https://bitbucketshield.azurewebsites.net/url/cakebuild/cake-integration-tests/IntegrationTests_develop) |
| Bitbucket Pipelines | Linux | [![Build Status](https://cakebitbucketpipelinesshield.azurewebsites.net/status/cakebuild/cake-integration-tests/develop)](https://cakebitbucketpipelinesshield.azurewebsites.net/url/cakebuild/cake-integration-tests/develop) | [![Build Status](https://cakebitbucketpipelinesshield.azurewebsites.net/status/cakebuild/cake-integration-tests/IntegrationTests_develop)](https://cakebitbucketpipelinesshield.azurewebsites.net/url/cakebuild/cake-integration-tests/IntegrationTests_develop) |
| GitLabs | Linux | [![build status](https://gitlab.com/cake-build/cake/badges/develop/build.svg)](https://gitlab.com/cake-build/cake/builds) |   |

## Code Coverage

Expand Down
59 changes: 59 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,62 @@
### New on 0.18.0 (Released 2017/03/07)

* Remove obsoleted DNU aliases
* WiXHeat misleading signature- no mode operates on file list
* Add "build tools" path for MSBuild 2017 to MSBuildResolver
* Add ChocolateyNew Alias
* Add support for NuGet Init and Add commands
* NUnitSettings does not have X86 property
* Enhance TeamCity provider
* Support for TF Build Commands
* Provide ability to add Custom attributes when creating AssemblyInfo
* Support for uninstall packages using Chocolatey
* Provide ability to specify name for xunit report
* MSBuild support for Visual Studio 2017 (aka "15")
* Add support for importing namespaces at the assembly level
* Add DotCover Merge
* Proposal: Allow modules to listen for script lifecycle events
* Support optional parameters on alias methods
* Support downloadable .cake script directive
* Extending the Sign command
* Fix ParseAssemblyInfo does not work .vb
* Duplicate depedencies references in project.json for Cake.Testing.XUnit
* Cake.Testing package depends on xunit.core package
* Optional parameter codegen not invariant
* XBuildRunner#GetToolExecutableNames returning wrong executables
* Space in Reference Preprocessor Directive Throws Illegal characters in path
* Spaces in #load path will cause an Illegal characters in path error.
* Add CakeNamespaceImport for BuildSystem Aliases
* HeatSettings.OutputGroup is unusable
* OctoPack not passing --format to octo.exe
* Error: Unknown Token when directory contains @ character.
* Using reserved name for parameter name causes a parser failure
* signtool.exe should be called only once when signing multiple files
* Missing MSBuild15 on enum NuGetMSBuildVersion for VS 2017
* Add ChocoPush alias for an IEnumerable<FilePath>
* Add ChocoPack alias for an IEnumerable<FilePath>
* Usage of -NoCache on installing tools and addins
* Mac OSX is not properly detected when running on Mono
* NuGet Tool Locator system paths on mac need updating
* Logging throws exception when there are curly braces in the string
* CopyDirectory - Missing Log information
* Teach XmlPeek to silence warnings, if needed
* Http call in unit test
* Add optional Go.CD Server URL Parameter to GetHistory
* Add RedirectStandardError to ProcessRunner
* Cake's default tools / addins / modules paths are not so default as they seem.
* ArgumentException with illegal character information
* Add mechanism to validate addins
* Support XUnit's x86 .exe runner
* Add Gitter and Twitter Notifications
* DownloadFile typo in docs
* Typo in SignTool docs
* Fix typos in GitVersion documentation
* Correct issue with GitLink Alias Category
* Fix commented example for DotNetCoreTest
* Fix doc comments in InnoSetupAliases
* Fix typo in comment
* Fixed Spelling Mistake.

### New on 0.17.0 (Released 2016/11/09)

* Allow custom loggers in the VSTestSettings
Expand Down
5 changes: 4 additions & 1 deletion bitbucket-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ pipelines:
- step:
script:
- ln -s /opt/dotnet .dotnet
- ./build.sh -t "Run-Unit-Tests"
- mkdir tools
- ln -s /opt/nuget/nuget.exe ./tools
- mono ./tools/nuget.exe install Cake -OutputDirectory ./tools -ExcludeVersion
- mono ./tools/Cake/Cake.exe build.cake --target="Run-Unit-Tests"
97 changes: 96 additions & 1 deletion build.cake
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
// Install addins.
#addin "nuget:https://www.nuget.org/api/v2?package=Newtonsoft.Json&version=9.0.1"
#addin "nuget:https://www.nuget.org/api/v2?package=Cake.Coveralls&version=0.2.0"
#addin "nuget:https://www.nuget.org/api/v2?package=Cake.Twitter&version=0.1.0"
#addin "nuget:https://www.nuget.org/api/v2?package=Cake.Gitter&version=0.2.0"

// Install tools.
#tool "nuget:https://www.nuget.org/api/v2?package=gitreleasemanager&version=0.5.0"
#tool "nuget:https://www.nuget.org/api/v2?package=GitVersion.CommandLine&version=3.6.2"
#tool "nuget:https://www.nuget.org/api/v2?package=coveralls.io&version=1.3.4"
#tool "nuget:https://www.nuget.org/api/v2?package=OpenCover&version=4.6.519"
#tool "nuget:https://www.nuget.org/api/v2?package=ReportGenerator&version=2.4.5"
#tool "nuget:https://www.nuget.org/api/v2?package=SignClient&version=0.5.0-beta4&prerelease"

// Load other scripts.
#load "./build/parameters.cake"
Expand Down Expand Up @@ -41,6 +44,45 @@ Setup(context =>
parameters.IsTagged);
});

Teardown(context =>
{
Information("Starting Teardown...");

if(context.Successful)
{
if(parameters.ShouldPublish)
{
if(parameters.CanPostToTwitter)
{
var message = "Version " + parameters.Version.SemVersion + " of Cake has just been released, https://www.nuget.org/packages/Cake.";

TwitterSendTweet(parameters.Twitter.ConsumerKey, parameters.Twitter.ConsumerSecret, parameters.Twitter.AccessToken, parameters.Twitter.AccessTokenSecret, message);
}

if(parameters.CanPostToGitter)
{
var message = "@/all Version " + parameters.Version.SemVersion + " of the Cake has just been released, https://www.nuget.org/packages/Cake.";

var postMessageResult = Gitter.Chat.PostMessage(
message: message,
messageSettings: new GitterChatMessageSettings { Token = parameters.Gitter.Token, RoomId = parameters.Gitter.RoomId}
);

if (postMessageResult.Ok)
{
Information("Message {0} succcessfully sent", postMessageResult.TimeStamp);
}
else
{
Error("Failed to send message: {0}", postMessageResult.Error);
}
}
}
}

Information("Finished running tasks.");
});

//////////////////////////////////////////////////////////////////////
// TASKS
//////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -301,7 +343,56 @@ Task("Create-NuGet-Packages")
});
});

Task("Sign-Binaries")
.IsDependentOn("Zip-Files")
.IsDependentOn("Create-Chocolatey-Packages")
.IsDependentOn("Create-NuGet-Packages")
.WithCriteria(() => parameters.ShouldPublish && !parameters.SkipSigning)
.Does(() =>
{
// Get the secret.
var secret = EnvironmentVariable("SIGNING_SECRET");
if(string.IsNullOrWhiteSpace(secret)) {
throw new InvalidOperationException("Could not resolve signing secret.");
}

var client = File("./tools/SignClient/tools/SignClient.dll");
var settings = File("./signclient.json");
var filter = File("./signclient.filter");

// Get the files to sign.
var files = GetFiles(string.Concat(parameters.Paths.Directories.NugetRoot, "/", "*.nupkg"))
+ parameters.Paths.Files.ZipArtifactPathDesktop
+ parameters.Paths.Files.ZipArtifactPathCoreClr;

foreach(var file in files)
{
Information("Signing {0}...", file.FullPath);

// Build the argument list.
var arguments = new ProcessArgumentBuilder()
.AppendQuoted(MakeAbsolute(client.Path).FullPath)
.Append("zip")
.AppendSwitchQuoted("-c", MakeAbsolute(settings.Path).FullPath)
.AppendSwitchQuoted("-i", MakeAbsolute(file).FullPath)
.AppendSwitchQuoted("-f", MakeAbsolute(filter).FullPath)
.AppendSwitchQuotedSecret("-s", secret)
.AppendSwitchQuoted("-n", "Cake")
.AppendSwitchQuoted("-d", "Cake (C# Make) is a cross platform build automation system.")
.AppendSwitchQuoted("-u", "http://cakebuild.net");

// Sign the binary.
var result = StartProcess("dotnet", new ProcessSettings { Arguments = arguments });
if(result != 0)
{
// We should not recover from this.
throw new InvalidOperationException("Signing failed!");
}
}
});

Task("Upload-AppVeyor-Artifacts")
.IsDependentOn("Sign-Binaries")
.IsDependentOn("Create-Chocolatey-Packages")
.WithCriteria(() => parameters.IsRunningOnAppVeyor)
.Does(() =>
Expand Down Expand Up @@ -329,6 +420,7 @@ Task("Upload-Coverage-Report")
});

Task("Publish-MyGet")
.IsDependentOn("Sign-Binaries")
.IsDependentOn("Package")
.WithCriteria(() => parameters.ShouldPublishToMyGet)
.Does(() =>
Expand Down Expand Up @@ -361,6 +453,7 @@ Task("Publish-MyGet")
});

Task("Publish-NuGet")
.IsDependentOn("Sign-Binaries")
.IsDependentOn("Create-NuGet-Packages")
.WithCriteria(() => parameters.ShouldPublish)
.Does(() =>
Expand Down Expand Up @@ -393,6 +486,7 @@ Task("Publish-NuGet")
});

Task("Publish-Chocolatey")
.IsDependentOn("Sign-Binaries")
.IsDependentOn("Create-Chocolatey-Packages")
.WithCriteria(() => parameters.ShouldPublish)
.Does(() =>
Expand Down Expand Up @@ -425,8 +519,9 @@ Task("Publish-Chocolatey")
});

Task("Publish-HomeBrew")
.WithCriteria(() => parameters.ShouldPublish)
.IsDependentOn("Sign-Binaries")
.IsDependentOn("Zip-Files")
.WithCriteria(() => parameters.ShouldPublish)
.Does(() =>
{
var hash = CalculateFileHash(parameters.Paths.Files.ZipArtifactPathDesktop).ToHex();
Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Param(
[string[]]$ScriptArgs
)

$CakeVersion = "0.16.2"
$CakeVersion = "0.17.0"
$DotNetChannel = "preview";
$DotNetVersion = "1.0.0-preview2-003121";
$DotNetInstallerUri = "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1";
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
TOOLS_DIR=$SCRIPT_DIR/tools
NUGET_EXE=$TOOLS_DIR/nuget.exe
NUGET_URL=https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
CAKE_VERSION=0.16.2
CAKE_VERSION=0.17.0
CAKE_EXE=$TOOLS_DIR/Cake.$CAKE_VERSION/Cake.exe

# Define default arguments.
Expand Down
Loading

0 comments on commit 585fcc5

Please sign in to comment.