Skip to content

Commit 0afe3ed

Browse files
committed
added explicit support for aspnetcore50, bump version to 0.12.1
1 parent ef13f89 commit 0afe3ed

File tree

13 files changed

+111
-59
lines changed

13 files changed

+111
-59
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ indent_size = 2
2323

2424
[*.json]
2525
indent_style = space
26-
indent_size = 2
26+
indent_size = 4

EditorConfig.sln

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 2013
4-
VisualStudioVersion = 12.0.30723.0
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.22512.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditorConfig.Core", "src\EditorConfig.Core\EditorConfig.Core.csproj", "{C33CF791-89D0-4ABE-B2B7-97E1F46A1319}"
77
EndProject
@@ -23,6 +23,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditorConfig.Tests", "src\E
2323
EndProject
2424
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditorConfig.Core.NET45", "src\EditorConfig.Core.NET45\EditorConfig.Core.NET45.csproj", "{F22050E7-E2C3-47BC-8B06-5BFE163FF045}"
2525
EndProject
26+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "EditorConfig.Core.ASPNET50", "src\EditorConfig.Core\EditorConfig.Core.ASPNET50.kproj", "{E7D90D82-D91C-4422-8EE3-74C149B76530}"
27+
EndProject
2628
Global
2729
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2830
Debug|Any CPU = Debug|Any CPU
@@ -45,6 +47,10 @@ Global
4547
{F22050E7-E2C3-47BC-8B06-5BFE163FF045}.Debug|Any CPU.Build.0 = Debug|Any CPU
4648
{F22050E7-E2C3-47BC-8B06-5BFE163FF045}.Release|Any CPU.ActiveCfg = Release|Any CPU
4749
{F22050E7-E2C3-47BC-8B06-5BFE163FF045}.Release|Any CPU.Build.0 = Release|Any CPU
50+
{E7D90D82-D91C-4422-8EE3-74C149B76530}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
51+
{E7D90D82-D91C-4422-8EE3-74C149B76530}.Debug|Any CPU.Build.0 = Debug|Any CPU
52+
{E7D90D82-D91C-4422-8EE3-74C149B76530}.Release|Any CPU.ActiveCfg = Release|Any CPU
53+
{E7D90D82-D91C-4422-8EE3-74C149B76530}.Release|Any CPU.Build.0 = Release|Any CPU
4854
EndGlobalSection
4955
GlobalSection(SolutionProperties) = preSolution
5056
HideSolutionNode = FALSE

build/build.fsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ let toSingleExe = fun _ ->
2424
let name = "editorconfig"
2525
let outDir = "build\output\EditorConfig.App"
2626
let inExe = sprintf "%s\editorconfig.exe" outDir
27-
let inDlls = sprintf "%s\EditorConfig.Core.dll %s\Minimatch.dll" outDir outDir
27+
let inDlls = sprintf "%s\EditorConfig.Core.dll" outDir
2828
let out = (ExecProcessAndReturnMessages(fun p ->
2929
p.FileName <- sn
3030
p.Arguments <- sprintf @"/target:winexe /out:build\output\%s.exe %s %s" name inExe inDlls
3131
) (TimeSpan.FromMinutes 5.0))
32+
out
3233

3334
Target "BuildApp" (fun _ ->
3435
let binDirs = !! "src/**/bin/**"
@@ -46,6 +47,10 @@ Target "BuildApp" (fun _ ->
4647
!! "src/**/*.csproj"
4748
|> Seq.map(fun f -> (f, buildDir + directoryInfo(f).Name.Replace(".csproj", "")))
4849
|> Seq.iter(fun (f,d) -> MSBuild d "Build" msbuildProperties (seq { yield f }) |> ignore)
50+
51+
!! "src/**/*.kproj"
52+
|> Seq.map(fun f -> (f, buildDir + directoryInfo(f).Name.Replace(".kproj", "")))
53+
|> Seq.iter(fun (f,d) -> MSBuild d "Build" msbuildProperties (seq { yield f }) |> ignore)
4954

5055
//does not seem to work, not a high priority
5156
//toSingleExe()
@@ -133,7 +138,13 @@ let patchVersionInCode = fun _ ->
133138
let updatedSource = regex_replace re (sprintf @"public static readonly string VersionString = ""%s""" patchedFileVersion) source
134139
WriteStringToFile false file updatedSource
135140

136-
141+
let patchVersionInProjectJson = fun _ ->
142+
let file = @"src\EditorConfig.Core\project.json"
143+
let source = ReadFileAsString file
144+
let re = @"""version"": ""[^""]+"""
145+
let updatedSource = regex_replace re (sprintf @"""version"": ""%s""" patchedFileVersion) source
146+
WriteStringToFile false file updatedSource
147+
137148
let chocoPack = fun _ ->
138149
let choco = @"build\tools\chocolatey\tools\chocolateyInstall\chocolatey.cmd"
139150
let spec = "build\chocolatey.nuspec"
@@ -197,6 +208,7 @@ Target "Version" (fun _ ->
197208
)
198209

199210
patchVersionInCode()
211+
patchVersionInProjectJson()
200212
)
201213

202214

build/chocolatey.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<metadata>
44
<id>editorconfig.core</id>
55
<title>EditorConfig Core</title>
6-
<version>0.12.0</version>
6+
<version>0.12.1</version>
77
<authors>EditorConfig Team</authors>
88
<owners>Hong Xu, Martijn Laarman</owners>
99
<summary>Editorconig commandline tooling written in .NET</summary>

build/nuget.nuspec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
<iconUrl>http://editorconfig.org/logo.png</iconUrl>
1616
</metadata>
1717
<files>
18+
<file src="output\EditorConfig.Core.ASPNET50\Release\aspnetcore50\EditorConfig.Core.dll" target="lib\aspnetcore50"/>
19+
<file src="output\EditorConfig.Core.ASPNET50\Release\aspnetcore50\EditorConfig.Core.pdb" target="lib\aspnetcore50"/>
20+
<file src="output\EditorConfig.Core.ASPNET50\Release\aspnetcore50\EditorConfig.Core.XML" target="lib\aspnetcore50"/>
1821
<file src="output\EditorConfig.Core.NET45\EditorConfig.Core.dll" target="lib\net45"/>
1922
<file src="output\EditorConfig.Core.NET45\EditorConfig.Core.pdb" target="lib\net45"/>
2023
<file src="output\EditorConfig.Core.NET45\EditorConfig.Core.XML" target="lib\net45"/>

src/EditorConfig.App/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
using System.Reflection;
33

44
[assembly: AssemblyTitleAttribute("EditorConfig.App")]
5-
[assembly: AssemblyCopyrightAttribute("editorconfig.org 2014")]
5+
[assembly: AssemblyCopyrightAttribute("editorconfig.org 2015")]
66
[assembly: AssemblyDescriptionAttribute("A .NET implementation of the editorconfig tooling")]
77
[assembly: AssemblyCompanyAttribute("EditorConfig")]
88
[assembly: AssemblyConfigurationAttribute("Release")]
99
[assembly: AssemblyVersionAttribute("0.0.0")]
10-
[assembly: AssemblyFileVersionAttribute("0.12.0")]
11-
[assembly: AssemblyInformationalVersionAttribute("0.12.0")]
10+
[assembly: AssemblyFileVersionAttribute("0.12.1")]
11+
[assembly: AssemblyInformationalVersionAttribute("0.12.1")]
1212
namespace System {
1313
internal static class AssemblyVersionInformation {
1414
internal const string Version = "0.0.0";
Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,16 @@
1-
using System.Reflection;
2-
using System.Runtime.CompilerServices;
3-
using System.Runtime.InteropServices;
1+
// <auto-generated/>
2+
using System.Reflection;
43

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("EditorConfig.Core.NET45")]
9-
[assembly: AssemblyDescription("")]
10-
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("")]
12-
[assembly: AssemblyProduct("EditorConfig.Core.NET45")]
13-
[assembly: AssemblyCopyright("Copyright © 2015")]
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("d4fc2924-b345-44a1-b360-821c1478ba50")]
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")]
4+
[assembly: AssemblyTitleAttribute("EditorConfig.Core.NET45")]
5+
[assembly: AssemblyCopyrightAttribute("editorconfig.org 2015")]
6+
[assembly: AssemblyDescriptionAttribute("EditorConfig.Core.NET45")]
7+
[assembly: AssemblyCompanyAttribute("EditorConfig")]
8+
[assembly: AssemblyConfigurationAttribute("Release")]
9+
[assembly: AssemblyVersionAttribute("0.0.0")]
10+
[assembly: AssemblyFileVersionAttribute("0.12.1")]
11+
[assembly: AssemblyInformationalVersionAttribute("0.12.1")]
12+
namespace System {
13+
internal static class AssemblyVersionInformation {
14+
internal const string Version = "0.0.0";
15+
}
16+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
</PropertyGroup>
7+
<Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.Props" Condition="'$(VSToolsPath)' != ''" />
8+
<PropertyGroup Label="Globals">
9+
<ProjectGuid>e7d90d82-d91c-4422-8ee3-74c149b76530</ProjectGuid>
10+
<RootNamespace>EditorConfig.Core</RootNamespace>
11+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
12+
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
13+
</PropertyGroup>
14+
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
15+
<AssemblyName>EditorConfig.Core</AssemblyName>
16+
</PropertyGroup>
17+
<PropertyGroup>
18+
<SchemaVersion>2.0</SchemaVersion>
19+
</PropertyGroup>
20+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
21+
<ProduceOutputsOnBuild>True</ProduceOutputsOnBuild>
22+
</PropertyGroup>
23+
<Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.targets" Condition="'$(VSToolsPath)' != ''" />
24+
<ProjectExtensions>
25+
<VisualStudio>
26+
<UserProperties project_1json__JSONSchema="http://www.asp.net/media/4878834/project.json" />
27+
</VisualStudio>
28+
</ProjectExtensions>
29+
</Project>

src/EditorConfig.Core/EditorConfigFile.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
using System.Collections.Generic;
33
using System.IO;
44
using System.Linq;
5-
using System.Net;
65
using System.Text;
76
using System.Text.RegularExpressions;
8-
using System.Threading.Tasks;
97

108
namespace EditorConfig.Core
119
{
@@ -45,7 +43,8 @@ public EditorConfigFile(string file)
4543

4644
public void Parse(string file)
4745
{
48-
var lines = File.ReadAllLines(file);
46+
var lines = File.ReadLines(file);
47+
4948
var activeSection = this.Global;
5049
foreach (var line in lines)
5150
{

src/EditorConfig.Core/EditorConfigParser.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.ComponentModel;
43
using System.Diagnostics;
54
using System.IO;
65
using System.Linq;
7-
using System.Runtime.InteropServices;
8-
using System.Text;
96
using System.Text.RegularExpressions;
10-
using System.Threading.Tasks;
117

128
namespace EditorConfig.Core
139
{
@@ -19,7 +15,7 @@ public class EditorConfigParser
1915
/// <summary>
2016
/// The current (and latest parser supported) version as string
2117
/// </summary>
22-
public static readonly string VersionString = "0.12.0";
18+
public static readonly string VersionString = "0.12.1";
2319

2420
/// <summary>
2521
/// The current editorconfig version
@@ -140,7 +136,8 @@ private IEnumerable<string> AllParentDirectories(string fullPath)
140136
{
141137
if (dir == null) yield break;
142138
yield return dir;
143-
dir = Directory.GetParent(dir).FullName;
139+
var dirInfo = new DirectoryInfo(dir);
140+
dir = dirInfo.Parent.FullName;
144141
} while (dir != root);
145142
}
146143
}

0 commit comments

Comments
 (0)