Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
augustoproiete committed Mar 6, 2021
2 parents d56f42c + c373ba3 commit 228b76d
Show file tree
Hide file tree
Showing 100 changed files with 2,395 additions and 148 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!--
BEFORE YOU SUBMIT AN ISSUE:
DO NOT CREATE AN ISSUE FOR A QUESTION - questions are better served in chat, and can be later raised as an issue if required.
- chat - https://gitter.im/cake-build/cake
DO NOT CREATE AN ISSUE FOR A QUESTION - questions are better served in discussions, and can be later raised as an issue if required.
- discussions - https://github.com/cake-build/cake/discussions
DELETE EVERYTHING IN THIS COMMENT BLOCK
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,31 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
os: [windows-latest, ubuntu-18.04, 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 2.1.811
- name: Install .NET Core SDK 2.1.813
uses: actions/setup-dotnet@v1
with:
dotnet-version: '2.1.811'
dotnet-version: '2.1.813'

- name: Install .NET Core SDK 3.1.404
- name: Install .NET Core SDK 3.1.406
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.404'
dotnet-version: '3.1.406'

- name: Install .NET Core SDK 5.0.101
- name: Install .NET Core SDK 5.0.103
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.101'
dotnet-version: '5.0.103'

- name: Install .NET Core SDK (global.json)
uses: actions/setup-dotnet@v1

- name: Run Cake script
uses: cake-build/cake-action@v1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ name: "CodeQL"

on:
push:
branches: [ develop, main, release/1.0.0 ]
branches: [ develop, main]
pull_request:
branches: [ develop, release/1.0.0 ]
branches: [ develop ]
schedule:
- cron: '41 21 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-18.04

strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]

steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ mono:
- 5.12.0
- 5.20.1

dotnet: 5.0.101
dotnet: 5.0.103

before_install:
- git fetch --unshallow # Travis always does a shallow clone, but GitVersion needs the full history including branches and tags
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ 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),
* Through GitHub, or through the [GitHub discussions](https://github.com/cake-build/cake/discussions) (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
* If approved through the GitHub discussions, 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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Make sure you've read the [contribution guidelines](https://cakebuild.net/docs/c

[![Follow @cakebuildnet](https://img.shields.io/badge/Twitter-Follow%20%40cakebuildnet-blue.svg)](https://twitter.com/intent/follow?screen_name=cakebuildnet)

[![Join the chat at https://gitter.im/cake-build/cake](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cake-build/cake?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join the chat at https://github.com/cake-build/cake/discussions](https://img.shields.io/badge/discussions-join%20chat-brightgreen)](https://github.com/cake-build/cake/discussions?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

## License

Expand Down
33 changes: 33 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
### New in 1.1.0 (Released 2021/03/06)

* 2983 No possibility of adding variable with isOutput=true in Azure Pipelines
* 2903 Integrate Cake.DotNetTool.Module
* 2685 Better dotnet tool integration
* 3190 Working directory is not respected in BuildContext constructor
* 3143 ParseSolution throws IndexOutOfRangeException on empty lines
* 3058 Regression: Tools are no longer not restored in working directory
* 2852 Terminal output colours
* 3219 Update nuspec iconUrl in packages to use CDN URL
* 3216 Remap NuGetLogger Verbose/Verbose to ICakeLog Debug/Diagnostic
* 3213 Add iconUrl fallback to Cake and Cake.CoreCLR packages
* 3193 Update Cake unit MS Test SDK dependencies to 16.9.1
* 3191 Update Roslyn (Microsoft.CodeAnalysis.CSharp.Scripting) to 3.9.0-4.final
* 3188 Update Cake.NuGet dependencies to latest stable
* 3144 TeamCity pull request info requires "GIT_BRANCH" environment variable
* 3133 Add IncludeNativeLibrariesForSelfExtract and IncludeAllContentForSelfExtract to DotNetCorePublishSettings
* 3127 Add ResultsDirectory to VSTestSettings
* 3125 ReportGenerator missing report types
* 3081 Add netcoreapp3.1 target to Cake
* 3066 Prefer tools with platform affinity
* 3040 Package ID Prefix Reservation for Cake.* on nuget.org for cake-build organization
* 3024 WindowsRegistry: Expose other root registry keys to Cake scripts (e.g. HKEY_CURRENT_USER)
* 2975 Add support for opting out of ANSI coloring via NO_COLOR env. variable
* 2967 Expose TeamCity build properties dictionary via TeamCityBuildInfo
* 2966 Enable AnsiConsoleRenderer in TeamCity and Azure Pipelines
* 2955 Add Build Start Date & Time to TeamCity build information
* 2941 ProcessArgumentBuilder helpers should return empty builder when values is null
* 2932 Add dotnet test --blame Flag to DotNetCoreTestSettings
* 2314 There's no way to set platform like Debug|iPhone
* 1633 Some command line output ignores system foreground color configuration
* 2904 (Frosting) Tool installer should respect configuration

### New in 1.0.0 (Released 2021/02/07)

* 3050 Frosting: Rename CakeHost extension from UseTool to InstallTool.
Expand Down
47 changes: 47 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Security Policy

## Supported Versions

| Version | Supported |
| --------- | ------------------ |
| 1.0.x | :white_check_mark: |
| 0.38.5 | :white_check_mark: |
| <= 0.38.4 | :x: |

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, either encrypted through Keybase chat
- [keybase.io/cakebuild](https://keybase.io/cakebuild)

Or report them to us using NuGet.org *Contact owners*
- [Cake](https://www.nuget.org/packages/Cake)
- [Cake.Tool](https://www.nuget.org/packages/Cake.Tool)
- [Cake.Frosting](https://www.nuget.org/packages/Cake.Frosting)
- [Cake.CoreCLR](https://www.nuget.org/packages/Cake.CoreCLR)
- [Cake.Core](https://www.nuget.org/packages/Cake.Core)
- [Cake.Common](https://www.nuget.org/packages/Cake.Common)
- [Cake.Testing](https://www.nuget.org/packages/Cake.Testing)
- [Cake.NuGet](https://www.nuget.org/packages/Cake.NuGet)
- [Cake.Cli](https://www.nuget.org/packages/Cake.Cli)

If you prefer to submit without logging in, send an email to [[email protected]](mailto:[email protected]).

You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message.

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

## Preferred Languages

We prefer all communications to be in English.
8 changes: 4 additions & 4 deletions build.cake
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Install modules
#module nuget:?package=Cake.DotNetTool.Module&version=0.4.0
#module nuget:?package=Cake.DotNetTool.Module&version=1.0.1

// Install addins.
#addin "nuget:https://api.nuget.org/v3/index.json?package=Cake.Coveralls&version=0.10.2"
#addin "nuget:https://api.nuget.org/v3/index.json?package=Cake.Twitter&version=0.10.1"
#addin "nuget:https://api.nuget.org/v3/index.json?package=Cake.Gitter&version=0.11.1"
#addin "nuget:https://api.nuget.org/v3/index.json?package=Cake.Coveralls&version=1.0.0"
#addin "nuget:https://api.nuget.org/v3/index.json?package=Cake.Twitter&version=1.0.0"
#addin "nuget:https://api.nuget.org/v3/index.json?package=Cake.Gitter&version=1.0.1"

// Install tools.
#tool "nuget:https://api.nuget.org/v3/index.json?package=coveralls.io&version=1.4.2"
Expand Down
4 changes: 2 additions & 2 deletions build.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
CAKE_VERSION=1.0.0-rc0003
DOTNET_VERSION=5.0.101
CAKE_VERSION=1.0.0
DOTNET_VERSION=5.0.103
3 changes: 2 additions & 1 deletion build/parameters.cake
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ public class BuildParameters
"Cake.Tool",
"Cake.Frosting",
"Cake.Frosting.Template",
"Cake.Cli"
"Cake.Cli",
"Cake.DotNetTool.Module"
},
new [] { "cake.portable" });

Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"src"
],
"sdk": {
"version": "5.0.101",
"version": "5.0.103",
"rollForward": "latestFeature"
}
}
1 change: 1 addition & 0 deletions nuspec/Cake.CoreCLR.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<license type="expression">MIT</license>
<projectUrl>https://cakebuild.net</projectUrl>
<icon>cake-medium.png</icon>
<iconUrl>https://cdn.jsdelivr.net/gh/cake-build/graphics/png/cake-medium.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<repository type="git" url="https://github.com/cake-build/cake"/>
<copyright>Copyright (c) .NET Foundation and contributors</copyright>
Expand Down
2 changes: 1 addition & 1 deletion nuspec/Cake.Portable.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<copyright>Copyright (c) .NET Foundation and contributors</copyright>
<licenseUrl>https://github.com/cake-build/cake/blob/develop/LICENSE</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<iconUrl>https://raw.githubusercontent.com/cake-build/graphics/master/png/cake-medium.png</iconUrl>
<iconUrl>https://cdn.jsdelivr.net/gh/cake-build/graphics/png/cake-medium.png</iconUrl>
</metadata>
<files></files>
</package>
1 change: 1 addition & 0 deletions nuspec/Cake.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<license type="expression">MIT</license>
<projectUrl>https://cakebuild.net</projectUrl>
<icon>cake-medium.png</icon>
<iconUrl>https://cdn.jsdelivr.net/gh/cake-build/graphics/png/cake-medium.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<repository type="git" url="https://github.com/cake-build/cake"/>
<copyright>Copyright (c) .NET Foundation and contributors</copyright>
Expand Down
2 changes: 1 addition & 1 deletion src/Cake.Common.Tests/Cake.Common.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</ItemGroup>
<!-- Global packages -->
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
Expand Down
6 changes: 4 additions & 2 deletions src/Cake.Common.Tests/Fixtures/Build/TeamCityFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@
using Cake.Common.Build.TeamCity;
using Cake.Common.Tests.Fakes;
using Cake.Core;
using Cake.Testing;
using Cake.Core.IO;
using NSubstitute;

namespace Cake.Common.Tests.Fixtures.Build
{
internal sealed class TeamCityFixture
{
public ICakeEnvironment Environment { get; set; }
public IFileSystem FileSystem { get; set; }
public FakeBuildSystemServiceMessageWriter Writer { get; set; }

public TeamCityFixture()
{
Environment = Substitute.For<ICakeEnvironment>();
Environment.WorkingDirectory.Returns("C:\\build\\CAKE-CAKE-JOB1");
Environment.GetEnvironmentVariable("TEAMCITY_VERSION").Returns((string)null);
FileSystem = Substitute.For<IFileSystem>();
Writer = new FakeBuildSystemServiceMessageWriter();
}

Expand All @@ -30,7 +32,7 @@ public void IsRunningOnTeamCity()

public TeamCityProvider CreateTeamCityService()
{
return new TeamCityProvider(Environment, Writer);
return new TeamCityProvider(Environment, FileSystem, Writer);
}
}
}
53 changes: 44 additions & 9 deletions src/Cake.Common.Tests/Fixtures/Build/TeamCityInfoFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,74 @@

using Cake.Common.Build.TeamCity.Data;
using Cake.Core;
using NSubstitute;
using Cake.Core.IO;
using Cake.Testing;

namespace Cake.Common.Tests.Fixtures.Build
{
internal sealed class TeamCityInfoFixture
{
public IFileSystem FileSystem { get; set; }
public ICakeEnvironment Environment { get; set; }

public TeamCityInfoFixture()
{
Environment = Substitute.For<ICakeEnvironment>();
Environment = FakeEnvironment.CreateUnixEnvironment();
FileSystem = new FakeFileSystem(Environment);
((FakeFileSystem)FileSystem).CreateDirectory("/Working");

Environment.GetEnvironmentVariable("TEAMCITY_BUILDCONF_NAME").Returns(@"Cake Build");
Environment.GetEnvironmentVariable("BUILD_NUMBER").Returns("10-Foo");
((FakeEnvironment)Environment).SetEnvironmentVariable("TEAMCITY_BUILDCONF_NAME", @"Cake Build");
((FakeEnvironment)Environment).SetEnvironmentVariable("BUILD_NUMBER", "10-Foo");
((FakeEnvironment)Environment).SetEnvironmentVariable("TEAMCITY_PROJECT_NAME", "Cake");
((FakeEnvironment)Environment).SetEnvironmentVariable("TEAMCITY_BUILD_PROPERTIES_FILE", "/Working/teamcity.build.properties");
((FakeEnvironment)Environment).SetEnvironmentVariable("Git_Branch", "refs/pull-requests/7/from");
((FakeEnvironment)Environment).SetEnvironmentVariable("BUILD_START_DATE", "20200822");
((FakeEnvironment)Environment).SetEnvironmentVariable("BUILD_START_TIME", "123456");
}

public void SetBuildPropertiesContent(string xml)
{
((FakeFileSystem)FileSystem).GetFile("/Working/teamcity.build.properties.xml").SetContent(xml);
}

public void SetConfigPropertiesContent(string xml)
{
((FakeFileSystem)FileSystem).GetFile("/Working/teamcity.config.configuration.xml").SetContent(xml);
}

public void SetRunnerPropertiesContent(string xml)
{
((FakeFileSystem)FileSystem).GetFile("/Working/teamcity.runner.configuration.xml").SetContent(xml);
}

public void SetGitBranch(string branch)
{
((FakeEnvironment)Environment).SetEnvironmentVariable("Git_Branch", branch);
}

Environment.GetEnvironmentVariable("TEAMCITY_PROJECT_NAME").Returns("Cake");
public void SetBuildStartDate(string startDate)
{
((FakeEnvironment)Environment).SetEnvironmentVariable("BUILD_START_DATE", startDate);
}

Environment.GetEnvironmentVariable("Git_Branch").Returns("refs/pull-requests/7/from");
public void SetBuildStartTime(string startTime)
{
((FakeEnvironment)Environment).SetEnvironmentVariable("BUILD_START_TIME", startTime);
}

public TeamCityPullRequestInfo CreatePullRequestInfo()
{
return new TeamCityPullRequestInfo(Environment);
return new TeamCityPullRequestInfo(Environment, CreateBuildInfo());
}

public TeamCityEnvironmentInfo CreateEnvironmentInfo()
{
return new TeamCityEnvironmentInfo(Environment);
return new TeamCityEnvironmentInfo(Environment, FileSystem);
}

public TeamCityBuildInfo CreateBuildInfo()
{
return new TeamCityBuildInfo(Environment);
return new TeamCityBuildInfo(Environment, FileSystem);
}

public TeamCityProjectInfo CreateProjectInfo()
Expand Down
Loading

0 comments on commit 228b76d

Please sign in to comment.