Skip to content

Commit d0176b3

Browse files
committed
Merge branch 'release/0.3.0'
# Conflicts: # src/source.extension.vsixmanifest
2 parents 0f11ab7 + 0952809 commit d0176b3

File tree

64 files changed

+1249
-869
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1249
-869
lines changed

appveyor.yml renamed to .appveyor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Build worker image
2-
image: Visual Studio 2017
2+
image: Visual Studio 2019
33

44
# Build script
55
init:
66
- git config --global core.autocrlf true
77

88
# Build script
99
build_script:
10-
- ps: .\build.ps1 -Target "AppVeyor"
10+
- ps: .\build.ps1 --target="AppVeyor"
1111

1212
# Tests
1313
test: off
@@ -24,4 +24,4 @@ branches:
2424

2525
# Build cache
2626
cache:
27-
- tools -> build.cake
27+
- tools -> build.cake

.config/dotnet-tools.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"cake.tool": {
6+
"version": "1.0.0-rc0001",
7+
"commands": [
8+
"dotnet-cake"
9+
]
10+
}
11+
}
12+
}

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[*.cs]
2+
3+
# IDE0065: Misplaced using directive
4+
csharp_using_directive_placement = outside_namespace:error

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ _NCrunch_WebCompiler
2929
![Tt]ools/packages.config
3030
[Tt]ools/**/*
3131
dist/**
32-
!src/Packages/**
32+
!src/Packages/**
33+
nupkgs/*

.vscode/settings.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"cSpell.words": [
3+
"Commitish",
4+
"Kristensen's",
5+
"MSIL",
6+
"Nupkgs",
7+
"Veyor",
8+
"addin",
9+
"addins",
10+
"bootstrapper",
11+
"choco",
12+
"nuget",
13+
"nupkg",
14+
"vsix",
15+
"vsixmanifest",
16+
"xunit"
17+
]
18+
}

Cake.VisualStudio.sln

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinTestTemplate", "templa
2626
EndProject
2727
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinTestBasicTemplate", "template\AddinTestBasicTemplate\AddinTestBasicTemplate.csproj", "{F21E9BF8-745B-4B29-B113-0E55AE840D24}"
2828
EndProject
29+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SolutionItemTemplate", "template\SolutionItemTemplate\SolutionItemTemplate.csproj", "{5D45E667-D12D-44F8-8A87-5503BF5DE274}"
30+
EndProject
2931
Global
3032
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3133
Debug|Any CPU = Debug|Any CPU
@@ -56,6 +58,10 @@ Global
5658
{F21E9BF8-745B-4B29-B113-0E55AE840D24}.Debug|Any CPU.Build.0 = Debug|Any CPU
5759
{F21E9BF8-745B-4B29-B113-0E55AE840D24}.Release|Any CPU.ActiveCfg = Release|Any CPU
5860
{F21E9BF8-745B-4B29-B113-0E55AE840D24}.Release|Any CPU.Build.0 = Release|Any CPU
61+
{5D45E667-D12D-44F8-8A87-5503BF5DE274}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
62+
{5D45E667-D12D-44F8-8A87-5503BF5DE274}.Debug|Any CPU.Build.0 = Debug|Any CPU
63+
{5D45E667-D12D-44F8-8A87-5503BF5DE274}.Release|Any CPU.ActiveCfg = Release|Any CPU
64+
{5D45E667-D12D-44F8-8A87-5503BF5DE274}.Release|Any CPU.Build.0 = Release|Any CPU
5965
EndGlobalSection
6066
GlobalSection(SolutionProperties) = preSolution
6167
HideSolutionNode = FALSE
@@ -66,5 +72,9 @@ Global
6672
{C27AB61E-D245-4A8C-ABD1-53313E388509} = {7067556F-B744-4F73-B509-C8CC9F559AB9}
6773
{AB983284-D1F6-4853-9462-402F2985A141} = {7067556F-B744-4F73-B509-C8CC9F559AB9}
6874
{F21E9BF8-745B-4B29-B113-0E55AE840D24} = {7067556F-B744-4F73-B509-C8CC9F559AB9}
75+
{5D45E667-D12D-44F8-8A87-5503BF5DE274} = {7067556F-B744-4F73-B509-C8CC9F559AB9}
76+
EndGlobalSection
77+
GlobalSection(ExtensibilityGlobals) = postSolution
78+
SolutionGuid = {15DFF96E-5E40-427D-B045-2B82B3A4FD92}
6979
EndGlobalSection
7080
EndGlobal

GitReleaseManager.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
issue-labels-include:
2+
- Breaking change
3+
- Feature
4+
- Bug
5+
- Improvement
6+
- Documentation
7+
issue-labels-exclude:
8+
- Build
9+
issue-labels-alias:
10+
- name: Documentation
11+
header: Documentation
12+
plural: Documentation

README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Cake for Visual Studio
2+
23
Adds support for the [Cake](https://cakebuild.net/)
3-
build tool in Visual Studio 2015. Includes support for the Task Runner Explorer,
4+
build tool in Visual Studio 2017 and 2019. Includes support for the Task Runner Explorer,
45
new item and project templates and bootstrapping important Cake files
56

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

89
## Install Cake
10+
911
In order to use this extension, you must have
1012
[Cake](https://cakebuild.net/) installed on your machine or in your solution.
1113

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

1921
## Build scripts
22+
2023
The Cake Task Runner automatically triggers when it finds
21-
a `build.cake` file.
24+
a `build.cake` file.
2225

2326
## Task Runner Explorer
27+
2428
Open Task Runner Explorer by right-clicking the Cake script and select **Task Runner Explorer** from
2529
the context menu:
2630

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

3741
### Bindings
42+
3843
Task bindings make it possible to associate individual tasks
3944
with Visual Studio events such as _Project Open_ etc.
4045

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

4550
### Cake installation
46-
The runner will automatically use a project-local copy of Cake if it is already present
47-
in the current directory or one of the default paths.
51+
52+
The runner will automatically use a project-local copy of Cake if it is already present
53+
in the current directory or one of the default paths.
4854
However, at this time, it will not automatically download Cake for you.
4955

5056
## Template Installers
57+
5158
Choose Cake Build from the Build menu to quickly install the default bootstrapper scripts or Cake configuration files into your solution.
5259

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

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

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

7173
## License
72-
[MIT Licence](LICENSE)
74+
75+
[MIT Licence](LICENSE)

build.cake

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@
55
var target = Argument("target", "Default");
66
var configuration = Argument("configuration", "Release");
77

8+
//////////////////////////////////////////////////////////////////////
9+
// MODULES
10+
//////////////////////////////////////////////////////////////////////
11+
12+
#module nuget:?package=Cake.DotNetTool.Module&version=0.4.0
13+
814
//////////////////////////////////////////////////////////////////////
915
// TOOLS / ADDINS
1016
//////////////////////////////////////////////////////////////////////
1117

12-
#addin "nuget:https://www.nuget.org/api/v2?package=MagicChunks&version=1.2.0.58"
13-
#tool "nuget:?package=gitreleasemanager&version=0.6.0"
14-
#tool "nuget:?package=GitVersion.CommandLine&version=3.4.1"
18+
#addin "nuget:?package=MagicChunks&version=2.0.0.119"
19+
#tool "dotnet:?package=GitReleaseManager.Tool&version=0.11.0"
20+
#tool "dotnet:?package=GitVersion.Tool&version=5.5.1"
1521

1622
//////////////////////////////////////////////////////////////////////
1723
// EXTERNAL SCRIPTS
@@ -88,7 +94,7 @@ Task("Clean")
8894
Task("Create-Release-Notes")
8995
.Does(() =>
9096
{
91-
GitReleaseManagerCreate(parameters.GitHub.UserName, parameters.GitHub.Password, "cake-build", "cake-vs", new GitReleaseManagerCreateSettings {
97+
GitReleaseManagerCreate(parameters.GitHub.Token, "cake-build", "cake-vs", new GitReleaseManagerCreateSettings {
9298
Milestone = parameters.Version.Milestone,
9399
Name = parameters.Version.Milestone,
94100
Prerelease = true,
@@ -114,18 +120,48 @@ Task("Restore")
114120
NuGetRestore(solutionPath);
115121
});
116122

123+
Task("Download-Nupkgs")
124+
.Does(() =>
125+
{
126+
if (!DirectoryExists("./nupkgs"))
127+
{
128+
Information("Creating nupkgs directory...");
129+
CreateDirectory("./nupkgs");
130+
}
131+
132+
var downloads = new Dictionary<string, string>();
133+
downloads.Add("https://www.nuget.org/api/v2/package/Cake.Core/0.38.5", "./nupkgs/cake.core.0.38.5.nupkg");
134+
downloads.Add("https://www.nuget.org/api/v2/package/Cake.Testing/0.38.5", "./nupkgs/cake.testing.0.38.5.nupkg");
135+
downloads.Add("https://www.nuget.org/api/v2/package/xunit/2.4.1", "./nupkgs/xunit.2.4.1.nupkg");
136+
downloads.Add("https://www.nuget.org/api/v2/package/xunit.abstractions/2.0.3", "./nupkgs/xunit.abstractions.2.0.3.nupkg");
137+
downloads.Add("https://www.nuget.org/api/v2/package/xunit.assert/2.4.1", "./nupkgs/xunit.assert.2.4.1.nupkg");
138+
downloads.Add("https://www.nuget.org/api/v2/package/xunit.core/2.4.1", "./nupkgs/xunit.core.2.4.1.nupkg");
139+
downloads.Add("https://www.nuget.org/api/v2/package/xunit.extensibility.core/2.4.1", "./nupkgs/xunit.extensibility.core.2.4.1.nupkg");
140+
downloads.Add("https://www.nuget.org/api/v2/package/xunit.extensibility.execution/2.4.1", "./nupkgs/xunit.extensibility.execution.2.4.1.nupkg");
141+
downloads.Add("https://www.nuget.org/api/v2/package/xunit.runner.visualstudio/2.4.3", "./nupkgs/xunit.runner.visualstudio.2.4.3.nupkg");
142+
143+
foreach (var download in downloads)
144+
{
145+
if (!FileExists(download.Value))
146+
{
147+
Information("Downloading {0}", download.Key);
148+
DownloadFile(download.Key, download.Value);
149+
}
150+
}
151+
});
152+
117153
Task("Build")
118154
.IsDependentOn("Clean")
119155
.IsDependentOn("Restore")
156+
.IsDependentOn("Download-Nupkgs")
120157
.IsDependentOn("Update-Manifest-Version")
121158
.Does(() =>
122159
{
123160
Information("Building solution...");
124161
MSBuild(solutionPath, settings =>
125162
settings.SetPlatformTarget(PlatformTarget.MSIL)
126163
.SetMSBuildPlatform(MSBuildPlatform.x86)
127-
.UseToolVersion(MSBuildToolVersion.VS2017)
128-
.WithProperty("TreatWarningsAsErrors","true")
164+
.UseToolVersion(MSBuildToolVersion.VS2019)
129165
.SetVerbosity(Verbosity.Quiet)
130166
.WithTarget("Build")
131167
.SetConfiguration(configuration));
@@ -145,8 +181,8 @@ Task("Publish-GitHub-Release")
145181
var buildResultDir = Directory(artifacts);
146182
var packageFile = File("Cake.VisualStudio.vsix");
147183

148-
GitReleaseManagerAddAssets(parameters.GitHub.UserName, parameters.GitHub.Password, "cake-build", "cake-vs", parameters.Version.Milestone, buildResultDir + packageFile);
149-
GitReleaseManagerClose(parameters.GitHub.UserName, parameters.GitHub.Password, "cake-build", "cake-vs", parameters.Version.Milestone);
184+
GitReleaseManagerAddAssets(parameters.GitHub.Token, "cake-build", "cake-vs", parameters.Version.Milestone, buildResultDir + packageFile);
185+
GitReleaseManagerClose(parameters.GitHub.Token, "cake-build", "cake-vs", parameters.Version.Milestone);
150186
})
151187
.OnError(exception =>
152188
{
@@ -182,3 +218,4 @@ Task("AppVeyor")
182218
.IsDependentOn("Publish-Extension");
183219

184220
RunTarget(target);
221+

0 commit comments

Comments
 (0)