Skip to content

Commit 759a2db

Browse files
authored
Merge pull request #14 from cake-contrib/netstandard
Cake 0.22.0 + netstandard1.6
2 parents aa484a7 + 5d3b874 commit 759a2db

File tree

13 files changed

+187
-100
lines changed

13 files changed

+187
-100
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ xtc-email
1212
.vs
1313
.vscode
1414
.idea
15+
*.user
1516

1617
#Cake
1718
[Tt]ools/

.nuget/packages.config

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 63 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,64 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
2-
<PropertyGroup>
3-
<TargetFramework>net45</TargetFramework>
4-
<ConsolePause>false</ConsolePause>
5-
</PropertyGroup>
6-
<ItemGroup>
7-
<PackageReference Include="Cake.Common" Version="0.17.0" />
8-
<PackageReference Include="Cake.Core" Version="0.17.0" />
9-
<PackageReference Include="Cake.Testing" Version="0.17.1" />
10-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
11-
<PackageReference Include="nunit" Version="3.8.1" />
12-
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0" />
13-
</ItemGroup>
14-
<ItemGroup>
15-
<ProjectReference Include="..\Cake.FileHelpers\Cake.FileHelpers.csproj" />
16-
</ItemGroup>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{19A394EA-534B-4426-BAF4-F18DEE9C88EC}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>Cake.FileHelpers.Tests</RootNamespace>
11+
<AssemblyName>Cake.FileHelpers.Tests</AssemblyName>
12+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<DebugSymbols>true</DebugSymbols>
17+
<DebugType>full</DebugType>
18+
<Optimize>false</Optimize>
19+
<OutputPath>bin\Debug\</OutputPath>
20+
<DefineConstants>DEBUG;TRACE</DefineConstants>
21+
<ErrorReport>prompt</ErrorReport>
22+
<WarningLevel>4</WarningLevel>
23+
</PropertyGroup>
24+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25+
<DebugType>pdbonly</DebugType>
26+
<Optimize>true</Optimize>
27+
<OutputPath>bin\Release\</OutputPath>
28+
<DefineConstants>TRACE</DefineConstants>
29+
<ErrorReport>prompt</ErrorReport>
30+
<WarningLevel>4</WarningLevel>
31+
</PropertyGroup>
32+
<ItemGroup>
33+
<Reference Include="System" />
34+
<Reference Include="System.Core" />
35+
<Reference Include="System.Xml.Linq" />
36+
<Reference Include="System.Data.DataSetExtensions" />
37+
<Reference Include="Microsoft.CSharp" />
38+
<Reference Include="System.Data" />
39+
<Reference Include="System.Net.Http" />
40+
<Reference Include="System.Xml" />
41+
</ItemGroup>
42+
<ItemGroup>
43+
<Compile Include="Fakes\FakeCakeArguments.cs" />
44+
<Compile Include="Fakes\FakeCakeContext.cs" />
45+
<Compile Include="Fakes\FakeLog.cs" />
46+
<Compile Include="FileHelperTests.cs" />
47+
<Compile Include="Properties\AssemblyInfo.cs" />
48+
</ItemGroup>
49+
<ItemGroup>
50+
<ProjectReference Include="..\Cake.FileHelpers\Cake.FileHelpers.csproj">
51+
<Project>{a5cf4e50-0bf9-4fd6-8c2a-46e481b39c9f}</Project>
52+
<Name>Cake.FileHelpers</Name>
53+
</ProjectReference>
54+
</ItemGroup>
55+
<ItemGroup>
56+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
57+
</ItemGroup>
58+
<ItemGroup>
59+
<PackageReference Include="Cake.Core" Version="0.22.0" />
60+
<PackageReference Include="Cake.Testing" Version="0.22.0" />
61+
<PackageReference Include="NUnit" Version="3.8.1" />
62+
</ItemGroup>
63+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1764
</Project>

Cake.FileHelpers.Tests/Fakes/FakeCakeContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public class FakeCakeContext
1515
public FakeCakeContext ()
1616
{
1717
testsDir = new DirectoryPath (
18-
System.IO.Path.GetFullPath (AppDomain.CurrentDomain.BaseDirectory));
19-
18+
System.IO.Path.GetFullPath (AppContext.BaseDirectory));
19+
2020
var fileSystem = new FileSystem ();
2121
log = new FakeLog();
2222
var runtime = new CakeRuntime();

Cake.FileHelpers.Tests/FileHelperTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ namespace Cake.FileHelpers.Tests
99
[TestFixture]
1010
public class FileHelperTests
1111
{
12-
FakeCakeContext context;
13-
14-
[OneTimeSetUp]
15-
public void RunBeforeAnyTests()
16-
{
17-
Environment.CurrentDirectory = System.IO.Path.GetDirectoryName(typeof(FileHelperTests).Assembly.Location);
18-
}
12+
FakeCakeContext context;
13+
14+
[OneTimeSetUp]
15+
public void RunBeforeAnyTests()
16+
{
17+
Environment.CurrentDirectory = System.IO.Path.GetDirectoryName(typeof(FileHelperTests).Assembly.Location);
18+
}
1919

2020
[SetUp]
2121
public void Setup ()
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("Cake.FileHelpers.Tests")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("Cake.FileHelpers.Tests")]
13+
[assembly: AssemblyCopyright("Copyright © Redth 2017")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("19a394ea-534b-4426-baf4-f18dee9c88ec")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

Cake.FileHelpers.nuspec

Lines changed: 0 additions & 23 deletions
This file was deleted.

Cake.FileHelpers.sln

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 2012
4-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.FileHelpers", "Cake.FileHelpers\Cake.FileHelpers.csproj", "{9F390A1D-29CB-4D80-84C6-EF7D1A283DD3}"
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26730.15
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cake.FileHelpers", "Cake.FileHelpers\Cake.FileHelpers.csproj", "{A5CF4E50-0BF9-4FD6-8C2A-46E481B39C9F}"
57
EndProject
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.FileHelpers.Tests", "Cake.FileHelpers.Tests\Cake.FileHelpers.Tests.csproj", "{4892D81A-AD1A-442B-B456-B1BF6754C75B}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.FileHelpers.Tests", "Cake.FileHelpers.Tests\Cake.FileHelpers.Tests.csproj", "{19A394EA-534B-4426-BAF4-F18DEE9C88EC}"
79
EndProject
810
Global
911
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1012
Debug|Any CPU = Debug|Any CPU
1113
Release|Any CPU = Release|Any CPU
1214
EndGlobalSection
1315
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{4892D81A-AD1A-442B-B456-B1BF6754C75B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{4892D81A-AD1A-442B-B456-B1BF6754C75B}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{4892D81A-AD1A-442B-B456-B1BF6754C75B}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{4892D81A-AD1A-442B-B456-B1BF6754C75B}.Release|Any CPU.Build.0 = Release|Any CPU
18-
{9F390A1D-29CB-4D80-84C6-EF7D1A283DD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19-
{9F390A1D-29CB-4D80-84C6-EF7D1A283DD3}.Debug|Any CPU.Build.0 = Debug|Any CPU
20-
{9F390A1D-29CB-4D80-84C6-EF7D1A283DD3}.Release|Any CPU.ActiveCfg = Release|Any CPU
21-
{9F390A1D-29CB-4D80-84C6-EF7D1A283DD3}.Release|Any CPU.Build.0 = Release|Any CPU
16+
{A5CF4E50-0BF9-4FD6-8C2A-46E481B39C9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17+
{A5CF4E50-0BF9-4FD6-8C2A-46E481B39C9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{A5CF4E50-0BF9-4FD6-8C2A-46E481B39C9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
19+
{A5CF4E50-0BF9-4FD6-8C2A-46E481B39C9F}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{19A394EA-534B-4426-BAF4-F18DEE9C88EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{19A394EA-534B-4426-BAF4-F18DEE9C88EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{19A394EA-534B-4426-BAF4-F18DEE9C88EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{19A394EA-534B-4426-BAF4-F18DEE9C88EC}.Release|Any CPU.Build.0 = Release|Any CPU
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {0021934F-F511-464A-A1EE-5E035D25D92C}
2230
EndGlobalSection
2331
EndGlobal
Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,31 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
2-
<PropertyGroup>
3-
<TargetFramework>net45</TargetFramework>
4-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
5-
<ConsolePause>false</ConsolePause>
6-
<Authors>redth</Authors>
7-
</PropertyGroup>
8-
<ItemGroup>
9-
<PackageReference Include="Cake.Core" Version="0.17.0" />
10-
</ItemGroup>
11-
</Project>
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>netstandard1.6;net46</TargetFrameworks>
5+
<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.6' ">1.6.1</NetStandardImplicitPackageVersion>
6+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
7+
</PropertyGroup>
8+
9+
<PropertyGroup>
10+
<PackageId>Cake.FileHelpers</PackageId>
11+
<Title>Cake.FileHelpers</Title>
12+
<Summary>Cake build aliases for Reading, Writing, and Replacing Text in files.</Summary>
13+
<Description>Cake Build addon to provide Aliases for common File operations (Reading, Writing, Replacing Text).</Description>
14+
<PackageTags>Cake Script Build</PackageTags>
15+
<Authors>Redth</Authors>
16+
<Owners>Redth</Owners>
17+
<PackageProjectUrl>https://github.com/cake-contrib/Cake.FileHelpers</PackageProjectUrl>
18+
<PackageIconUrl>https://raw.githubusercontent.com/cake-contrib/Cake.FileHelpers/master/icon.png</PackageIconUrl>
19+
<PackageLicenseUrl>https://raw.githubusercontent.com/cake-contrib/Cake.FileHelpers/master/LICENSE.md</PackageLicenseUrl>
20+
</PropertyGroup>
21+
22+
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
23+
<PackageReference Include="System.Threading.Tasks.Parallel" Version="4.3.0" />
24+
</ItemGroup>
25+
26+
<ItemGroup>
27+
<PackageReference Include="Cake.Core" Version="0.22.0" />
28+
<PackageReference Include="Cake.Common" Version="0.22.0" />
29+
</ItemGroup>
30+
31+
</Project>

Cake.FileHelpers/Namespaces.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System.Runtime.CompilerServices;
2+
3+
// ReSharper disable CheckNamespace
4+
namespace Cake.FileHelpers
5+
{
6+
/// <summary>
7+
/// This namespace contain types representing data used for common file operations,
8+
/// such as reading, writing and replacing text.
9+
/// </summary>
10+
[CompilerGenerated]
11+
internal class NamespaceDoc
12+
{
13+
}
14+
}

Cake.FileHelpers/Properties/Namespaces.cs

Lines changed: 0 additions & 14 deletions
This file was deleted.

appveyor.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ install:
55
- set NUGET_VERSION=%APPVEYOR_BUILD_VERSION%
66
build_script:
77
- ps: .\build.ps1 -Target package
8-
test_script:
9-
- ps: .\build.ps1 -Target test
8+
test:
9+
assemblies:
10+
- '**\*.Tests.dll'
1011
artifacts:
11-
- path: output\*.nupkg
12+
- path: Cake.FileHelpers\bin\Release\*.nupkg
1213
name: NuGet

build.cake

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
var sln = "./Cake.FileHelpers.sln";
44
var nuspec = "./Cake.FileHelpers.nuspec";
5-
var nugetVersion = Argument ("nuget_version", EnvironmentVariable ("NUGET_VERSION") ?? "1.0.0.0");
5+
var nugetVersion = Argument ("nuget_version", EnvironmentVariable ("NUGET_VERSION") ?? "9.9.9");
66
var target = Argument ("target", "build");
77
var configuration = Argument("configuration", EnvironmentVariable ("CONFIGURATION") ?? "Release");
88

99
Task ("build").Does (() =>
1010
{
11-
NuGetRestore (sln);
12-
DotNetBuild (sln, c => c.Configuration = configuration);
11+
MSBuild ("./Cake.FileHelpers.sln", c => c.Targets.Add ("restore"));
12+
MSBuild ("./Cake.FileHelpers.sln", c => c.Configuration = configuration);
1313
});
1414

1515
Task ("package").IsDependentOn("build").Does (() =>
1616
{
17-
EnsureDirectoryExists ("./output/");
18-
19-
NuGetPack (nuspec, new NuGetPackSettings {
20-
OutputDirectory = "./output/",
21-
Version = nugetVersion,
17+
MSBuild ("./Cake.FileHelpers/Cake.FileHelpers.csproj", c => {
18+
c.Configuration = configuration;
19+
c.Targets.Add ("pack");
20+
c.Properties.Add ("PackageVersion", new List<string> { nugetVersion });
21+
c.Properties.Add ("IncludeSymbols", new List<string> { "true" });
2222
});
2323
});
2424

@@ -30,7 +30,8 @@ Task ("clean").Does (() =>
3030

3131
Task("test").IsDependentOn("package").Does(() =>
3232
{
33-
NUnit3("./**/bin/"+ configuration + "/*.Tests.dll");
33+
MSBuild ("./Cake.FileHelpers.Tests/Cake.FileHelpers.Tests.csproj", c => c.Configuration = configuration);
34+
NUnit3("./**/bin/"+ configuration + "/**/*.Tests.dll");
3435
});
3536

3637
Task ("Default")

0 commit comments

Comments
 (0)