Skip to content

Commit

Permalink
added explicit support for aspnetcore50, bump version to 0.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz committed Feb 13, 2015
1 parent ef13f89 commit 0afe3ed
Show file tree
Hide file tree
Showing 13 changed files with 111 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ indent_size = 2

[*.json]
indent_style = space
indent_size = 2
indent_size = 4
10 changes: 8 additions & 2 deletions EditorConfig.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30723.0
# Visual Studio 14
VisualStudioVersion = 14.0.22512.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditorConfig.Core", "src\EditorConfig.Core\EditorConfig.Core.csproj", "{C33CF791-89D0-4ABE-B2B7-97E1F46A1319}"
EndProject
Expand All @@ -23,6 +23,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditorConfig.Tests", "src\E
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditorConfig.Core.NET45", "src\EditorConfig.Core.NET45\EditorConfig.Core.NET45.csproj", "{F22050E7-E2C3-47BC-8B06-5BFE163FF045}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "EditorConfig.Core.ASPNET50", "src\EditorConfig.Core\EditorConfig.Core.ASPNET50.kproj", "{E7D90D82-D91C-4422-8EE3-74C149B76530}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -45,6 +47,10 @@ Global
{F22050E7-E2C3-47BC-8B06-5BFE163FF045}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F22050E7-E2C3-47BC-8B06-5BFE163FF045}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F22050E7-E2C3-47BC-8B06-5BFE163FF045}.Release|Any CPU.Build.0 = Release|Any CPU
{E7D90D82-D91C-4422-8EE3-74C149B76530}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E7D90D82-D91C-4422-8EE3-74C149B76530}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E7D90D82-D91C-4422-8EE3-74C149B76530}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E7D90D82-D91C-4422-8EE3-74C149B76530}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
16 changes: 14 additions & 2 deletions build/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ let toSingleExe = fun _ ->
let name = "editorconfig"
let outDir = "build\output\EditorConfig.App"
let inExe = sprintf "%s\editorconfig.exe" outDir
let inDlls = sprintf "%s\EditorConfig.Core.dll %s\Minimatch.dll" outDir outDir
let inDlls = sprintf "%s\EditorConfig.Core.dll" outDir
let out = (ExecProcessAndReturnMessages(fun p ->
p.FileName <- sn
p.Arguments <- sprintf @"/target:winexe /out:build\output\%s.exe %s %s" name inExe inDlls
) (TimeSpan.FromMinutes 5.0))
out

Target "BuildApp" (fun _ ->
let binDirs = !! "src/**/bin/**"
Expand All @@ -46,6 +47,10 @@ Target "BuildApp" (fun _ ->
!! "src/**/*.csproj"
|> Seq.map(fun f -> (f, buildDir + directoryInfo(f).Name.Replace(".csproj", "")))
|> Seq.iter(fun (f,d) -> MSBuild d "Build" msbuildProperties (seq { yield f }) |> ignore)

!! "src/**/*.kproj"
|> Seq.map(fun f -> (f, buildDir + directoryInfo(f).Name.Replace(".kproj", "")))
|> Seq.iter(fun (f,d) -> MSBuild d "Build" msbuildProperties (seq { yield f }) |> ignore)

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


let patchVersionInProjectJson = fun _ ->
let file = @"src\EditorConfig.Core\project.json"
let source = ReadFileAsString file
let re = @"""version"": ""[^""]+"""
let updatedSource = regex_replace re (sprintf @"""version"": ""%s""" patchedFileVersion) source
WriteStringToFile false file updatedSource

let chocoPack = fun _ ->
let choco = @"build\tools\chocolatey\tools\chocolateyInstall\chocolatey.cmd"
let spec = "build\chocolatey.nuspec"
Expand Down Expand Up @@ -197,6 +208,7 @@ Target "Version" (fun _ ->
)

patchVersionInCode()
patchVersionInProjectJson()
)


Expand Down
2 changes: 1 addition & 1 deletion build/chocolatey.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<metadata>
<id>editorconfig.core</id>
<title>EditorConfig Core</title>
<version>0.12.0</version>
<version>0.12.1</version>
<authors>EditorConfig Team</authors>
<owners>Hong Xu, Martijn Laarman</owners>
<summary>Editorconig commandline tooling written in .NET</summary>
Expand Down
3 changes: 3 additions & 0 deletions build/nuget.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
<iconUrl>http://editorconfig.org/logo.png</iconUrl>
</metadata>
<files>
<file src="output\EditorConfig.Core.ASPNET50\Release\aspnetcore50\EditorConfig.Core.dll" target="lib\aspnetcore50"/>
<file src="output\EditorConfig.Core.ASPNET50\Release\aspnetcore50\EditorConfig.Core.pdb" target="lib\aspnetcore50"/>
<file src="output\EditorConfig.Core.ASPNET50\Release\aspnetcore50\EditorConfig.Core.XML" target="lib\aspnetcore50"/>
<file src="output\EditorConfig.Core.NET45\EditorConfig.Core.dll" target="lib\net45"/>
<file src="output\EditorConfig.Core.NET45\EditorConfig.Core.pdb" target="lib\net45"/>
<file src="output\EditorConfig.Core.NET45\EditorConfig.Core.XML" target="lib\net45"/>
Expand Down
6 changes: 3 additions & 3 deletions src/EditorConfig.App/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
using System.Reflection;

[assembly: AssemblyTitleAttribute("EditorConfig.App")]
[assembly: AssemblyCopyrightAttribute("editorconfig.org 2014")]
[assembly: AssemblyCopyrightAttribute("editorconfig.org 2015")]
[assembly: AssemblyDescriptionAttribute("A .NET implementation of the editorconfig tooling")]
[assembly: AssemblyCompanyAttribute("EditorConfig")]
[assembly: AssemblyConfigurationAttribute("Release")]
[assembly: AssemblyVersionAttribute("0.0.0")]
[assembly: AssemblyFileVersionAttribute("0.12.0")]
[assembly: AssemblyInformationalVersionAttribute("0.12.0")]
[assembly: AssemblyFileVersionAttribute("0.12.1")]
[assembly: AssemblyInformationalVersionAttribute("0.12.1")]
namespace System {
internal static class AssemblyVersionInformation {
internal const string Version = "0.0.0";
Expand Down
50 changes: 15 additions & 35 deletions src/EditorConfig.Core.NET45/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,36 +1,16 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// <auto-generated/>
using System.Reflection;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("EditorConfig.Core.NET45")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EditorConfig.Core.NET45")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("d4fc2924-b345-44a1-b360-821c1478ba50")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyTitleAttribute("EditorConfig.Core.NET45")]
[assembly: AssemblyCopyrightAttribute("editorconfig.org 2015")]
[assembly: AssemblyDescriptionAttribute("EditorConfig.Core.NET45")]
[assembly: AssemblyCompanyAttribute("EditorConfig")]
[assembly: AssemblyConfigurationAttribute("Release")]
[assembly: AssemblyVersionAttribute("0.0.0")]
[assembly: AssemblyFileVersionAttribute("0.12.1")]
[assembly: AssemblyInformationalVersionAttribute("0.12.1")]
namespace System {
internal static class AssemblyVersionInformation {
internal const string Version = "0.0.0";
}
}
29 changes: 29 additions & 0 deletions src/EditorConfig.Core/EditorConfig.Core.ASPNET50.kproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>e7d90d82-d91c-4422-8ee3-74c149b76530</ProjectGuid>
<RootNamespace>EditorConfig.Core</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AssemblyName>EditorConfig.Core</AssemblyName>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<ProduceOutputsOnBuild>True</ProduceOutputsOnBuild>
</PropertyGroup>
<Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.targets" Condition="'$(VSToolsPath)' != ''" />
<ProjectExtensions>
<VisualStudio>
<UserProperties project_1json__JSONSchema="http://www.asp.net/media/4878834/project.json" />
</VisualStudio>
</ProjectExtensions>
</Project>
5 changes: 2 additions & 3 deletions src/EditorConfig.Core/EditorConfigFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace EditorConfig.Core
{
Expand Down Expand Up @@ -45,7 +43,8 @@ public EditorConfigFile(string file)

public void Parse(string file)
{
var lines = File.ReadAllLines(file);
var lines = File.ReadLines(file);

var activeSection = this.Global;
foreach (var line in lines)
{
Expand Down
9 changes: 3 additions & 6 deletions src/EditorConfig.Core/EditorConfigParser.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace EditorConfig.Core
{
Expand All @@ -19,7 +15,7 @@ public class EditorConfigParser
/// <summary>
/// The current (and latest parser supported) version as string
/// </summary>
public static readonly string VersionString = "0.12.0";
public static readonly string VersionString = "0.12.1";

/// <summary>
/// The current editorconfig version
Expand Down Expand Up @@ -140,7 +136,8 @@ private IEnumerable<string> AllParentDirectories(string fullPath)
{
if (dir == null) yield break;
yield return dir;
dir = Directory.GetParent(dir).FullName;
var dirInfo = new DirectoryInfo(dir);
dir = dirInfo.Parent.FullName;
} while (dir != root);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/EditorConfig.Core/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
using System.Reflection;

[assembly: AssemblyTitleAttribute("EditorConfig.Core")]
[assembly: AssemblyCopyrightAttribute("editorconfig.org 2014")]
[assembly: AssemblyCopyrightAttribute("editorconfig.org 2015")]
[assembly: AssemblyDescriptionAttribute("A .NET implementation of the core editorconfig library")]
[assembly: AssemblyCompanyAttribute("EditorConfig")]
[assembly: AssemblyConfigurationAttribute("Release")]
[assembly: AssemblyVersionAttribute("0.0.0")]
[assembly: AssemblyFileVersionAttribute("0.12.0")]
[assembly: AssemblyInformationalVersionAttribute("0.12.0")]
[assembly: AssemblyFileVersionAttribute("0.12.1")]
[assembly: AssemblyInformationalVersionAttribute("0.12.1")]
namespace System {
internal static class AssemblyVersionInformation {
internal const string Version = "0.0.0";
Expand Down
26 changes: 26 additions & 0 deletions src/EditorConfig.Core/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"description": "Editorconfig library for .NET",
"authors": [ "Editorconfig Team" ],
"version": "0.12.1",
"dependencies": {
"System.Text.RegularExpressions": "4.0.10-beta-22416"
},
"code": [ "../EditorConfig.Core/*.cs" ],
"frameworks": {
"aspnet50": {
"dependencies": {
}
},
"aspnetcore50": {
"dependencies": {
"System.Text.RegularExpressions": "4.0.10-beta-22416",
"System.Runtime": "4.0.20-beta-22416",
"System.Linq": "4.0.0-beta-22416",
"System.IO": "4.0.0-beta-22416",
"System.IO.FileSystem": "4.0.0-beta-22416",
"System.Globalization.Extensions": "4.0.0-beta-22416",
"System.Diagnostics.Debug": "4.0.10-beta-22416"
}
}
}
}
6 changes: 3 additions & 3 deletions src/EditorConfig.Tests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
using System.Reflection;

[assembly: AssemblyTitleAttribute("EditorConfig.Tests")]
[assembly: AssemblyCopyrightAttribute("editorconfig.org 2014")]
[assembly: AssemblyCopyrightAttribute("editorconfig.org 2015")]
[assembly: AssemblyDescriptionAttribute("EditorConfig.Tests")]
[assembly: AssemblyCompanyAttribute("EditorConfig")]
[assembly: AssemblyConfigurationAttribute("Release")]
[assembly: AssemblyVersionAttribute("0.0.0")]
[assembly: AssemblyFileVersionAttribute("0.12.0")]
[assembly: AssemblyInformationalVersionAttribute("0.12.0")]
[assembly: AssemblyFileVersionAttribute("0.12.1")]
[assembly: AssemblyInformationalVersionAttribute("0.12.1")]
namespace System {
internal static class AssemblyVersionInformation {
internal const string Version = "0.0.0";
Expand Down

0 comments on commit 0afe3ed

Please sign in to comment.