Skip to content

Commit

Permalink
Merge branch 'release/0.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
agc93 committed Sep 25, 2016
2 parents 200ee33 + e9d6e1e commit 7b5816d
Show file tree
Hide file tree
Showing 113 changed files with 3,864 additions and 193 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@ x64/
# NCrunch
*.ncrunchsolution
*.ncrunchproject
_NCrunch_WebCompiler
_NCrunch_WebCompiler

#Cake (generated)
![Tt]ools/packages.config
[Tt]ools/**/*
dist/**
!src/Packages/**
Binary file added .vscode/.BROWSE.VC.DB
Binary file not shown.
Binary file added .vscode/.BROWSE.VC.DB-wal
Binary file not shown.
43 changes: 43 additions & 0 deletions Cake.VisualStudio.sln
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,28 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.VisualStudio", "src\Cake.VisualStudio.csproj", "{94660BCF-169A-42E1-BD84-345449743069}"
ProjectSection(ProjectDependencies) = postProject
{FCE573DD-E74E-4AB1-9D17-56FC8869797F} = {FCE573DD-E74E-4AB1-9D17-56FC8869797F}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{04D0CE67-A915-44BB-BC3C-8E7885CF9E97}"
ProjectSection(SolutionItems) = preProject
build.cake = build.cake
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinTemplate", "template\AddinTemplate\AddinTemplate.csproj", "{FCE573DD-E74E-4AB1-9D17-56FC8869797F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Templates", "Templates", "{7067556F-B744-4F73-B509-C8CC9F559AB9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModuleTemplate", "template\ModuleTemplate\ModuleTemplate.csproj", "{85BCBED7-39BD-4670-85F7-EE36D0DA31C0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ItemTemplate", "template\ItemTemplate\ItemTemplate.csproj", "{C27AB61E-D245-4A8C-ABD1-53313E388509}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinTestTemplate", "template\AddinTestTemplate\AddinTestTemplate.csproj", "{AB983284-D1F6-4853-9462-402F2985A141}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinTestBasicTemplate", "template\AddinTestBasicTemplate\AddinTestBasicTemplate.csproj", "{F21E9BF8-745B-4B29-B113-0E55AE840D24}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -20,8 +36,35 @@ Global
{94660BCF-169A-42E1-BD84-345449743069}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94660BCF-169A-42E1-BD84-345449743069}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94660BCF-169A-42E1-BD84-345449743069}.Release|Any CPU.Build.0 = Release|Any CPU
{FCE573DD-E74E-4AB1-9D17-56FC8869797F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FCE573DD-E74E-4AB1-9D17-56FC8869797F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FCE573DD-E74E-4AB1-9D17-56FC8869797F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FCE573DD-E74E-4AB1-9D17-56FC8869797F}.Release|Any CPU.Build.0 = Release|Any CPU
{85BCBED7-39BD-4670-85F7-EE36D0DA31C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85BCBED7-39BD-4670-85F7-EE36D0DA31C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85BCBED7-39BD-4670-85F7-EE36D0DA31C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{85BCBED7-39BD-4670-85F7-EE36D0DA31C0}.Release|Any CPU.Build.0 = Release|Any CPU
{C27AB61E-D245-4A8C-ABD1-53313E388509}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C27AB61E-D245-4A8C-ABD1-53313E388509}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C27AB61E-D245-4A8C-ABD1-53313E388509}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C27AB61E-D245-4A8C-ABD1-53313E388509}.Release|Any CPU.Build.0 = Release|Any CPU
{AB983284-D1F6-4853-9462-402F2985A141}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB983284-D1F6-4853-9462-402F2985A141}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB983284-D1F6-4853-9462-402F2985A141}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB983284-D1F6-4853-9462-402F2985A141}.Release|Any CPU.Build.0 = Release|Any CPU
{F21E9BF8-745B-4B29-B113-0E55AE840D24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{FCE573DD-E74E-4AB1-9D17-56FC8869797F} = {7067556F-B744-4F73-B509-C8CC9F559AB9}
{85BCBED7-39BD-4670-85F7-EE36D0DA31C0} = {7067556F-B744-4F73-B509-C8CC9F559AB9}
{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}
EndGlobalSection
EndGlobal
12 changes: 12 additions & 0 deletions Cake.VisualStudio.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=StyleCop_002ESA1634/@EntryIndexedValue">DO_NOT_SHOW</s:String></wpf:ResourceDictionary>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeThisQualifier/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantNameQualifier/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantUsingDirective/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=StyleCop_002ESA1101/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=StyleCop_002ESA1200/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=StyleCop_002ESA1309/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=StyleCop_002ESA1600/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FBuiltInTypes/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FSimpleTypes/@EntryIndexedValue">ERROR</s:String>
</wpf:ResourceDictionary>
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) Alistair Chapman
Copyright (c) .NET Foundation and Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
# Cake Task Runner extension
# Cake for Visual Studio
Adds support for the [Cake](http://cakebuild.net/)
build tool in Visual Studio 2015's Task Runner Explorer.
build tool in Visual Studio 2015. Includes support for the Task Runner Explorer,
new item and project templates and bootstrapping important Cake files

Based off Mads Kristensen's [Brunch Task Runner](https://github.com/madskristensen/BrunchTaskRunner) extension.
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.
[Cake](https://cakebuild.net/) installed on your machine or in your solution.

Use [chocolatey](http://chocolatey.org/) to install it globally by
typing the following in an elevated command prompt:

>choco install -y cake.portable
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.
Expand All @@ -37,6 +40,24 @@ with Visual Studio events such as _Project Open_ etc.

![Bindings](art/bindings.png)

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.
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)

## Templates

The extension includes an item template for build scripts and project templates for Cake modules, addins, and unit tests.

![Project Template](art/templates.png)

## Contribute
Check out the [Cake contribution guidelines](https://http://cakebuild.net/docs/contributing/guidelines)
if you want to contribute to this project.
Expand Down
24 changes: 24 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Build script
init:
- git config --global core.autocrlf true

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

# Tests
test: off

# Branches to build
branches:
# Whitelist
only:
- develop
- main
- /r/.*/
- /release/.*/
- /hotfix/.*/

# Build cache
cache:
- tools -> build.cake
Binary file added art/cake-icon.pxf
Binary file not shown.
Binary file added art/installers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/item-template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/project-template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/templates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 107 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
///////////////////////////////////////////////////////////////////////////////
// ARGUMENTS
///////////////////////////////////////////////////////////////////////////////

var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");

///////////////////////////////////////////////////////////////////////////////
// GLOBAL VARIABLES
///////////////////////////////////////////////////////////////////////////////

var solutionPath = File("./Cake.VisualStudio.sln");
var solution = ParseSolution(solutionPath);
var projects = solution.Projects;
var projectPaths = projects.Select(p => p.Path.GetDirectory());
var artifacts = "./dist/";

///////////////////////////////////////////////////////////////////////////////
// BUILD VARIABLES
///////////////////////////////////////////////////////////////////////////////

var buildSystem = BuildSystem;
var IsMainCakeVsRepo = StringComparer.OrdinalIgnoreCase.Equals("cake-build/cake-vs", buildSystem.AppVeyor.Environment.Repository.Name);
var IsMainCakeVsBranch = StringComparer.OrdinalIgnoreCase.Equals("master", buildSystem.AppVeyor.Environment.Repository.Branch);
var IsBuildTagged = buildSystem.AppVeyor.Environment.Repository.Tag.IsTag
&& !string.IsNullOrWhiteSpace(buildSystem.AppVeyor.Environment.Repository.Tag.Name);

///////////////////////////////////////////////////////////////////////////////
// SETUP / TEARDOWN
///////////////////////////////////////////////////////////////////////////////

Setup(ctx =>
{
// Executed BEFORE the first task.
Information("Running tasks...");
});

Teardown(ctx =>
{
// Executed AFTER the last task.
Information("Finished running tasks.");
});

///////////////////////////////////////////////////////////////////////////////
// TASKS
///////////////////////////////////////////////////////////////////////////////

Task("Clean")
.Does(() =>
{
// Clean solution directories.
foreach(var path in projectPaths)
{
Information("Cleaning {0}", path);
CleanDirectories(path + "/**/bin/" + configuration);
CleanDirectories(path + "/**/obj/" + configuration);
}
Information("Cleaning common files...");
CleanDirectory(artifacts);
});

Task("Restore")
.Does(() =>
{
// Restore all NuGet packages.
Information("Restoring solution...");
NuGetRestore(solutionPath);
});

Task("Build")
.IsDependentOn("Clean")
.IsDependentOn("Restore")
.Does(() =>
{
Information("Building solution...");
MSBuild(solutionPath, settings =>
settings.SetPlatformTarget(PlatformTarget.MSIL)
.SetMSBuildPlatform(MSBuildPlatform.x86)
.WithProperty("TreatWarningsAsErrors","true")
.SetVerbosity(Verbosity.Quiet)
.WithTarget("Build")
.SetConfiguration(configuration));
});

Task("Post-Build")
.IsDependentOn("Build")
.Does(() =>
{
CopyFileToDirectory("./src/bin/" + configuration + "/Cake.VisualStudio.vsix", artifacts);
});

Task("Publish-Extension")
.IsDependentOn("Post-Build")
.WithCriteria(() => AppVeyor.IsRunningOnAppVeyor)
.WithCriteria(() => IsMainCakeVsRepo)
.Does(() =>
{
AppVeyor.UploadArtifact(artifacts + "Cake.VisualStudio.vsix");
});

Task("Default")
.IsDependentOn("Post-Build");

Task("AppVeyor")
.IsDependentOn("Publish-Extension");

RunTarget(target);
Loading

0 comments on commit 7b5816d

Please sign in to comment.