Skip to content

Commit

Permalink
Merge branch 'release/0.3.0'
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/source.extension.vsixmanifest
  • Loading branch information
gep13 committed Dec 21, 2020
2 parents 0f11ab7 + 0952809 commit d0176b3
Show file tree
Hide file tree
Showing 64 changed files with 1,249 additions and 869 deletions.
6 changes: 3 additions & 3 deletions appveyor.yml → .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Build worker image
image: Visual Studio 2017
image: Visual Studio 2019

# Build script
init:
- git config --global core.autocrlf true

# Build script
build_script:
- ps: .\build.ps1 -Target "AppVeyor"
- ps: .\build.ps1 --target="AppVeyor"

# Tests
test: off
Expand All @@ -24,4 +24,4 @@ branches:

# Build cache
cache:
- tools -> build.cake
- tools -> build.cake
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"cake.tool": {
"version": "1.0.0-rc0001",
"commands": [
"dotnet-cake"
]
}
}
}
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[*.cs]

# IDE0065: Misplaced using directive
csharp_using_directive_placement = outside_namespace:error
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ _NCrunch_WebCompiler
![Tt]ools/packages.config
[Tt]ools/**/*
dist/**
!src/Packages/**
!src/Packages/**
nupkgs/*
18 changes: 18 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"cSpell.words": [
"Commitish",
"Kristensen's",
"MSIL",
"Nupkgs",
"Veyor",
"addin",
"addins",
"bootstrapper",
"choco",
"nuget",
"nupkg",
"vsix",
"vsixmanifest",
"xunit"
]
}
10 changes: 10 additions & 0 deletions Cake.VisualStudio.sln
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinTestTemplate", "templa
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinTestBasicTemplate", "template\AddinTestBasicTemplate\AddinTestBasicTemplate.csproj", "{F21E9BF8-745B-4B29-B113-0E55AE840D24}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SolutionItemTemplate", "template\SolutionItemTemplate\SolutionItemTemplate.csproj", "{5D45E667-D12D-44F8-8A87-5503BF5DE274}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -56,6 +58,10 @@ Global
{F21E9BF8-745B-4B29-B113-0E55AE840D24}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F21E9BF8-745B-4B29-B113-0E55AE840D24}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F21E9BF8-745B-4B29-B113-0E55AE840D24}.Release|Any CPU.Build.0 = Release|Any CPU
{5D45E667-D12D-44F8-8A87-5503BF5DE274}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5D45E667-D12D-44F8-8A87-5503BF5DE274}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D45E667-D12D-44F8-8A87-5503BF5DE274}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5D45E667-D12D-44F8-8A87-5503BF5DE274}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -66,5 +72,9 @@ Global
{C27AB61E-D245-4A8C-ABD1-53313E388509} = {7067556F-B744-4F73-B509-C8CC9F559AB9}
{AB983284-D1F6-4853-9462-402F2985A141} = {7067556F-B744-4F73-B509-C8CC9F559AB9}
{F21E9BF8-745B-4B29-B113-0E55AE840D24} = {7067556F-B744-4F73-B509-C8CC9F559AB9}
{5D45E667-D12D-44F8-8A87-5503BF5DE274} = {7067556F-B744-4F73-B509-C8CC9F559AB9}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {15DFF96E-5E40-427D-B045-2B82B3A4FD92}
EndGlobalSection
EndGlobal
12 changes: 12 additions & 0 deletions GitReleaseManager.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
issue-labels-include:
- Breaking change
- Feature
- Bug
- Improvement
- Documentation
issue-labels-exclude:
- Build
issue-labels-alias:
- name: Documentation
header: Documentation
plural: Documentation
27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Cake for Visual Studio

Adds support for the [Cake](https://cakebuild.net/)
build tool in Visual Studio 2015. Includes support for the Task Runner Explorer,
build tool in Visual Studio 2017 and 2019. Includes support for the Task Runner Explorer,
new item and project templates and bootstrapping important Cake files

Originally based off Mads Kristensen's [Brunch Task Runner](https://github.com/madskristensen/BrunchTaskRunner) extension.

## Install Cake

In order to use this extension, you must have
[Cake](https://cakebuild.net/) installed on your machine or in your solution.

Expand All @@ -17,10 +19,12 @@ typing the following in an elevated command prompt:
Alternatively, if you have run the bootstrapper at least once, Visual Studio should automatically discover it (see below).

## Build scripts

The Cake Task Runner automatically triggers when it finds
a `build.cake` file.
a `build.cake` file.

## Task Runner Explorer

Open Task Runner Explorer by right-clicking the Cake script and select **Task Runner Explorer** from
the context menu:

Expand All @@ -35,6 +39,7 @@ Each task can be executed by double-clicking the task.
![Console output](art/console.png)

### Bindings

Task bindings make it possible to associate individual tasks
with Visual Studio events such as _Project Open_ etc.

Expand All @@ -43,11 +48,13 @@ with Visual Studio events such as _Project Open_ etc.
These bindings are stored in your `cake.config` file.

### Cake installation
The runner will automatically use a project-local copy of Cake if it is already present
in the current directory or one of the default paths.

The runner will automatically use a project-local copy of Cake if it is already present
in the current directory or one of the default paths.
However, at this time, it will not automatically download Cake for you.

## Template Installers

Choose Cake Build from the Build menu to quickly install the default bootstrapper scripts or Cake configuration files into your solution.

![Template installers](art/installers.png)
Expand All @@ -59,14 +66,10 @@ The extension includes an item template for build scripts and project templates
![Project Template](art/templates.png)

## Contribute
Check out the [Cake contribution guidelines](https://cakebuild.net/docs/contributing/guidelines)
if you want to contribute to this project.

For cloning and building this project yourself, make sure
to install the
[Extensibility Tools 2015](https://visualstudiogallery.msdn.microsoft.com/ab39a092-1343-46e2-b0f1-6a3f91155aa6)
extension for Visual Studio which enables some features
used by this project.
Check out the [Cake contribution guidelines](https://cakebuild.net/docs/contributing/contribution-guidelines)
if you want to contribute to this project.

## License
[MIT Licence](LICENSE)

[MIT Licence](LICENSE)
53 changes: 45 additions & 8 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");

//////////////////////////////////////////////////////////////////////
// MODULES
//////////////////////////////////////////////////////////////////////

#module nuget:?package=Cake.DotNetTool.Module&version=0.4.0

//////////////////////////////////////////////////////////////////////
// TOOLS / ADDINS
//////////////////////////////////////////////////////////////////////

#addin "nuget:https://www.nuget.org/api/v2?package=MagicChunks&version=1.2.0.58"
#tool "nuget:?package=gitreleasemanager&version=0.6.0"
#tool "nuget:?package=GitVersion.CommandLine&version=3.4.1"
#addin "nuget:?package=MagicChunks&version=2.0.0.119"
#tool "dotnet:?package=GitReleaseManager.Tool&version=0.11.0"
#tool "dotnet:?package=GitVersion.Tool&version=5.5.1"

//////////////////////////////////////////////////////////////////////
// EXTERNAL SCRIPTS
Expand Down Expand Up @@ -88,7 +94,7 @@ Task("Clean")
Task("Create-Release-Notes")
.Does(() =>
{
GitReleaseManagerCreate(parameters.GitHub.UserName, parameters.GitHub.Password, "cake-build", "cake-vs", new GitReleaseManagerCreateSettings {
GitReleaseManagerCreate(parameters.GitHub.Token, "cake-build", "cake-vs", new GitReleaseManagerCreateSettings {
Milestone = parameters.Version.Milestone,
Name = parameters.Version.Milestone,
Prerelease = true,
Expand All @@ -114,18 +120,48 @@ Task("Restore")
NuGetRestore(solutionPath);
});
Task("Download-Nupkgs")
.Does(() =>
{
if (!DirectoryExists("./nupkgs"))
{
Information("Creating nupkgs directory...");
CreateDirectory("./nupkgs");
}
var downloads = new Dictionary<string, string>();
downloads.Add("https://www.nuget.org/api/v2/package/Cake.Core/0.38.5", "./nupkgs/cake.core.0.38.5.nupkg");
downloads.Add("https://www.nuget.org/api/v2/package/Cake.Testing/0.38.5", "./nupkgs/cake.testing.0.38.5.nupkg");
downloads.Add("https://www.nuget.org/api/v2/package/xunit/2.4.1", "./nupkgs/xunit.2.4.1.nupkg");
downloads.Add("https://www.nuget.org/api/v2/package/xunit.abstractions/2.0.3", "./nupkgs/xunit.abstractions.2.0.3.nupkg");
downloads.Add("https://www.nuget.org/api/v2/package/xunit.assert/2.4.1", "./nupkgs/xunit.assert.2.4.1.nupkg");
downloads.Add("https://www.nuget.org/api/v2/package/xunit.core/2.4.1", "./nupkgs/xunit.core.2.4.1.nupkg");
downloads.Add("https://www.nuget.org/api/v2/package/xunit.extensibility.core/2.4.1", "./nupkgs/xunit.extensibility.core.2.4.1.nupkg");
downloads.Add("https://www.nuget.org/api/v2/package/xunit.extensibility.execution/2.4.1", "./nupkgs/xunit.extensibility.execution.2.4.1.nupkg");
downloads.Add("https://www.nuget.org/api/v2/package/xunit.runner.visualstudio/2.4.3", "./nupkgs/xunit.runner.visualstudio.2.4.3.nupkg");
foreach (var download in downloads)
{
if (!FileExists(download.Value))
{
Information("Downloading {0}", download.Key);
DownloadFile(download.Key, download.Value);
}
}
});
Task("Build")
.IsDependentOn("Clean")
.IsDependentOn("Restore")
.IsDependentOn("Download-Nupkgs")
.IsDependentOn("Update-Manifest-Version")
.Does(() =>
{
Information("Building solution...");
MSBuild(solutionPath, settings =>
settings.SetPlatformTarget(PlatformTarget.MSIL)
.SetMSBuildPlatform(MSBuildPlatform.x86)
.UseToolVersion(MSBuildToolVersion.VS2017)
.WithProperty("TreatWarningsAsErrors","true")
.UseToolVersion(MSBuildToolVersion.VS2019)
.SetVerbosity(Verbosity.Quiet)
.WithTarget("Build")
.SetConfiguration(configuration));
Expand All @@ -145,8 +181,8 @@ Task("Publish-GitHub-Release")
var buildResultDir = Directory(artifacts);
var packageFile = File("Cake.VisualStudio.vsix");
GitReleaseManagerAddAssets(parameters.GitHub.UserName, parameters.GitHub.Password, "cake-build", "cake-vs", parameters.Version.Milestone, buildResultDir + packageFile);
GitReleaseManagerClose(parameters.GitHub.UserName, parameters.GitHub.Password, "cake-build", "cake-vs", parameters.Version.Milestone);
GitReleaseManagerAddAssets(parameters.GitHub.Token, "cake-build", "cake-vs", parameters.Version.Milestone, buildResultDir + packageFile);
GitReleaseManagerClose(parameters.GitHub.Token, "cake-build", "cake-vs", parameters.Version.Milestone);
})
.OnError(exception =>
{
Expand Down Expand Up @@ -182,3 +218,4 @@ Task("AppVeyor")
.IsDependentOn("Publish-Extension");
RunTarget(target);

Loading

0 comments on commit d0176b3

Please sign in to comment.