From 5dc9c2a3668384d37bf294b45e778ecd16e4e30a Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Tue, 4 Dec 2018 06:33:49 -0600 Subject: [PATCH 1/6] Create a separate package for CommonMark.NET.Console --- CommonMark.Console/App.nuget.config | 14 ------------ CommonMark.Console/CommonMark.Console.csproj | 10 ++++++++ CommonMark.NET.Console.nuspec | 24 ++++++++++++++++++++ CommonMark.NET.nuspec | 2 -- CommonMark.sln | 1 + CommonMark/CommonMark.Base.csproj | 1 - 6 files changed, 35 insertions(+), 17 deletions(-) delete mode 100644 CommonMark.Console/App.nuget.config create mode 100644 CommonMark.NET.Console.nuspec diff --git a/CommonMark.Console/App.nuget.config b/CommonMark.Console/App.nuget.config deleted file mode 100644 index 3ed0222..0000000 --- a/CommonMark.Console/App.nuget.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/CommonMark.Console/CommonMark.Console.csproj b/CommonMark.Console/CommonMark.Console.csproj index c5d2b4c..2a066b4 100644 --- a/CommonMark.Console/CommonMark.Console.csproj +++ b/CommonMark.Console/CommonMark.Console.csproj @@ -15,6 +15,10 @@ 1.0.0.0 1.0.0.0 + + false + ..\CommonMark.NET.Console.nuspec + configuration=$(Configuration) @@ -39,4 +43,10 @@ + + + Properties\CommonMark.NET.Console.nuspec + + + \ No newline at end of file diff --git a/CommonMark.NET.Console.nuspec b/CommonMark.NET.Console.nuspec new file mode 100644 index 0000000..b3ffd8a --- /dev/null +++ b/CommonMark.NET.Console.nuspec @@ -0,0 +1,24 @@ + + + + CommonMark.NET.Console + 0.15.1 + CommonMark.NET.Console + Kārlis Gaņģis + https://raw.githubusercontent.com/Knagis/CommonMark.NET/master/LICENSE.md + https://github.com/Knagis/CommonMark.NET/ + https://raw.githubusercontent.com/dcurtis/markdown-mark/master/png/32x20.png + false + Fastest .NET library for converting Markdown documents to HTML. + .NET library for converting Markdown documents to HTML according to the CommonMark specification. Optimized for maximum performance and targets every .NET version since 2.0, including PCL, Mono and .NET Core. + Fixed lists with tab characters and double trailing newlines. + Copyright © Kārlis Gaņģis 2014-2017 + CommonMark Markdown + + + + + + + + \ No newline at end of file diff --git a/CommonMark.NET.nuspec b/CommonMark.NET.nuspec index c6869a8..5b3b3a7 100644 --- a/CommonMark.NET.nuspec +++ b/CommonMark.NET.nuspec @@ -24,7 +24,5 @@ - - \ No newline at end of file diff --git a/CommonMark.sln b/CommonMark.sln index ff3e7a3..f1fcea3 100644 --- a/CommonMark.sln +++ b/CommonMark.sln @@ -10,6 +10,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Other", "Other", "{EC5FFA77-658F-4D2F-A5CE-5F1BD44F3FC0}" ProjectSection(SolutionItems) = preProject appveyor.yml = appveyor.yml + CommonMark.NET.Console.nuspec = CommonMark.NET.Console.nuspec CommonMark.NET.nuspec = CommonMark.NET.nuspec LICENSE.md = LICENSE.md README.md = README.md diff --git a/CommonMark/CommonMark.Base.csproj b/CommonMark/CommonMark.Base.csproj index 7039b40..11e81b6 100644 --- a/CommonMark/CommonMark.Base.csproj +++ b/CommonMark/CommonMark.Base.csproj @@ -22,7 +22,6 @@ 0.1.0.0 0.1.0.0 - false ..\CommonMark.NET.nuspec configuration=$(Configuration) From b0ccff4f744957787796316a4840c9991fdecdb2 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Tue, 4 Dec 2018 06:37:15 -0600 Subject: [PATCH 2/6] Generate packages on build an attach to AppVeyor --- CommonMark.Console/CommonMark.Console.csproj | 2 +- CommonMark/CommonMark.Base.csproj | 2 +- appveyor.yml | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CommonMark.Console/CommonMark.Console.csproj b/CommonMark.Console/CommonMark.Console.csproj index 2a066b4..56790e8 100644 --- a/CommonMark.Console/CommonMark.Console.csproj +++ b/CommonMark.Console/CommonMark.Console.csproj @@ -16,7 +16,7 @@ 1.0.0.0 1.0.0.0 - false + true ..\CommonMark.NET.Console.nuspec configuration=$(Configuration) diff --git a/CommonMark/CommonMark.Base.csproj b/CommonMark/CommonMark.Base.csproj index 11e81b6..9ef7e5c 100644 --- a/CommonMark/CommonMark.Base.csproj +++ b/CommonMark/CommonMark.Base.csproj @@ -22,7 +22,7 @@ 0.1.0.0 0.1.0.0 - false + true ..\CommonMark.NET.nuspec configuration=$(Configuration) diff --git a/appveyor.yml b/appveyor.yml index 8a59fc1..26a9793 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,4 +8,7 @@ before_build: - nuget restore build: parallel: true - verbosity: minimal \ No newline at end of file + verbosity: minimal +artifacts: +- path: 'CommonMark\bin\*\*.nupkg' +- path: 'CommonMark.Console\bin\*\*.nupkg' From cbb2cc88d2c50e18e0ec0b4a8ac7877769b601bf Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Tue, 4 Dec 2018 09:05:50 -0600 Subject: [PATCH 3/6] Rename CommonMark.Console.exe to cmark.exe --- CommonMark.Console/CommonMark.Console.csproj | 2 ++ CommonMark.NET.Console.nuspec | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CommonMark.Console/CommonMark.Console.csproj b/CommonMark.Console/CommonMark.Console.csproj index 56790e8..51b9e2d 100644 --- a/CommonMark.Console/CommonMark.Console.csproj +++ b/CommonMark.Console/CommonMark.Console.csproj @@ -4,6 +4,8 @@ net45 Exe + + cmark diff --git a/CommonMark.NET.Console.nuspec b/CommonMark.NET.Console.nuspec index b3ffd8a..3ff539b 100644 --- a/CommonMark.NET.Console.nuspec +++ b/CommonMark.NET.Console.nuspec @@ -17,8 +17,8 @@ - - + + \ No newline at end of file From 3f924d3d2194eb1a8db3a70d75837cc4b955d05c Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Tue, 4 Dec 2018 09:29:15 -0600 Subject: [PATCH 4/6] Use Nerdbank.GitVersioning --- CommonMark.Console/CommonMark.Console.csproj | 9 ++------- CommonMark/CommonMark.Base.csproj | 7 +------ CommonMark/CommonMarkConverter.cs | 18 +----------------- version.json | 18 ++++++++++++++++++ 4 files changed, 22 insertions(+), 30 deletions(-) create mode 100644 version.json diff --git a/CommonMark.Console/CommonMark.Console.csproj b/CommonMark.Console/CommonMark.Console.csproj index 51b9e2d..4afeb22 100644 --- a/CommonMark.Console/CommonMark.Console.csproj +++ b/CommonMark.Console/CommonMark.Console.csproj @@ -15,9 +15,6 @@ https://github.com/Knagis/CommonMark.NET Copyright © Kārlis Gaņģis 2014 - 1.0.0.0 - 1.0.0.0 - true ..\CommonMark.NET.Console.nuspec configuration=$(Configuration) @@ -42,13 +39,11 @@ - + - - Properties\CommonMark.NET.Console.nuspec - + \ No newline at end of file diff --git a/CommonMark/CommonMark.Base.csproj b/CommonMark/CommonMark.Base.csproj index 9ef7e5c..53da549 100644 --- a/CommonMark/CommonMark.Base.csproj +++ b/CommonMark/CommonMark.Base.csproj @@ -19,9 +19,6 @@ https://github.com/Knagis/CommonMark.NET Copyright © Kārlis Gaņģis 2014-2016 - 0.1.0.0 - 0.1.0.0 - true ..\CommonMark.NET.nuspec configuration=$(Configuration) @@ -69,9 +66,7 @@ - - Properties\CommonMark.NET.nuspec - + \ No newline at end of file diff --git a/CommonMark/CommonMarkConverter.cs b/CommonMark/CommonMarkConverter.cs index 59e03cd..cda18f1 100644 --- a/CommonMark/CommonMarkConverter.cs +++ b/CommonMark/CommonMarkConverter.cs @@ -3,7 +3,6 @@ using System; using System.IO; using System.Reflection; -using System.Text; using System.Threading; namespace CommonMark @@ -46,22 +45,7 @@ public static Version Version private static Version InitializeVersion() { - // System.Xml is not available so resort to string parsing. - using (var stream = Assembly.GetManifestResourceStream("CommonMark.Properties.CommonMark.NET.nuspec")) - using (var reader = new System.IO.StreamReader(stream, Encoding.UTF8)) - { - string line; - while ((line = reader.ReadLine()) != null) - { - var i = line.IndexOf("", StringComparison.Ordinal); - if (i == -1) - continue; - - i += 9; - return new Version(line.Substring(i, line.IndexOf("", StringComparison.Ordinal) - i)); - } - } - return null; + return new Version(ThisAssembly.AssemblyFileVersion); } /// diff --git a/version.json b/version.json new file mode 100644 index 0000000..3ab71f1 --- /dev/null +++ b/version.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", + "version": "0.15.1.0", + "assemblyVersion": { + "precision": "minor" + }, + "publicReleaseRefSpec": [ + "^refs/heads/master$" + ], + "nugetPackageVersion": { + "semVer": 1 + }, + "cloudBuild": { + "buildNumber": { + "enabled": true + } + } +} From a64ac6c3e476d9e9d8a4e799aa3dce191cbe826d Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Tue, 4 Dec 2018 09:08:51 -0600 Subject: [PATCH 5/6] Create the NuGet packages using built-in project features --- CommonMark.Console/CommonMark.Console.csproj | 27 +++++++++++++++++-- CommonMark.NET.Console.nuspec | 24 ----------------- CommonMark.NET.nuspec | 28 -------------------- CommonMark.sln | 2 -- CommonMark/CommonMark.Base.csproj | 17 ++++++++++-- 5 files changed, 40 insertions(+), 58 deletions(-) delete mode 100644 CommonMark.NET.Console.nuspec delete mode 100644 CommonMark.NET.nuspec diff --git a/CommonMark.Console/CommonMark.Console.csproj b/CommonMark.Console/CommonMark.Console.csproj index 4afeb22..4d75087 100644 --- a/CommonMark.Console/CommonMark.Console.csproj +++ b/CommonMark.Console/CommonMark.Console.csproj @@ -15,9 +15,20 @@ https://github.com/Knagis/CommonMark.NET Copyright © Kārlis Gaņģis 2014 + CommonMark.NET.Console + CommonMark.NET.Console + Kārlis Gaņģis + https://raw.githubusercontent.com/Knagis/CommonMark.NET/master/LICENSE.md + https://github.com/Knagis/CommonMark.NET/ + https://raw.githubusercontent.com/dcurtis/markdown-mark/master/png/32x20.png + false + .NET library for converting Markdown documents to HTML according to the CommonMark specification. Optimized for maximum performance and targets every .NET version since 2.0, including PCL, Mono and .NET Core. + Fixed lists with tab characters and double trailing newlines. + CommonMark Markdown + + true + true true - ..\CommonMark.NET.Console.nuspec - configuration=$(Configuration) @@ -46,4 +57,16 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/CommonMark.NET.Console.nuspec b/CommonMark.NET.Console.nuspec deleted file mode 100644 index 3ff539b..0000000 --- a/CommonMark.NET.Console.nuspec +++ /dev/null @@ -1,24 +0,0 @@ - - - - CommonMark.NET.Console - 0.15.1 - CommonMark.NET.Console - Kārlis Gaņģis - https://raw.githubusercontent.com/Knagis/CommonMark.NET/master/LICENSE.md - https://github.com/Knagis/CommonMark.NET/ - https://raw.githubusercontent.com/dcurtis/markdown-mark/master/png/32x20.png - false - Fastest .NET library for converting Markdown documents to HTML. - .NET library for converting Markdown documents to HTML according to the CommonMark specification. Optimized for maximum performance and targets every .NET version since 2.0, including PCL, Mono and .NET Core. - Fixed lists with tab characters and double trailing newlines. - Copyright © Kārlis Gaņģis 2014-2017 - CommonMark Markdown - - - - - - - - \ No newline at end of file diff --git a/CommonMark.NET.nuspec b/CommonMark.NET.nuspec deleted file mode 100644 index 5b3b3a7..0000000 --- a/CommonMark.NET.nuspec +++ /dev/null @@ -1,28 +0,0 @@ - - - - CommonMark.NET - 0.15.1 - CommonMark.NET - Kārlis Gaņģis - https://raw.githubusercontent.com/Knagis/CommonMark.NET/master/LICENSE.md - https://github.com/Knagis/CommonMark.NET/ - https://raw.githubusercontent.com/dcurtis/markdown-mark/master/png/32x20.png - false - Fastest .NET library for converting Markdown documents to HTML. - .NET library for converting Markdown documents to HTML according to the CommonMark specification. Optimized for maximum performance and targets every .NET version since 2.0, including PCL, Mono and .NET Core. - Fixed lists with tab characters and double trailing newlines. - Copyright © Kārlis Gaņģis 2014-2017 - CommonMark Markdown - - - - - - - - - - - - \ No newline at end of file diff --git a/CommonMark.sln b/CommonMark.sln index f1fcea3..404ef6b 100644 --- a/CommonMark.sln +++ b/CommonMark.sln @@ -10,8 +10,6 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Other", "Other", "{EC5FFA77-658F-4D2F-A5CE-5F1BD44F3FC0}" ProjectSection(SolutionItems) = preProject appveyor.yml = appveyor.yml - CommonMark.NET.Console.nuspec = CommonMark.NET.Console.nuspec - CommonMark.NET.nuspec = CommonMark.NET.nuspec LICENSE.md = LICENSE.md README.md = README.md runtests.pl = runtests.pl diff --git a/CommonMark/CommonMark.Base.csproj b/CommonMark/CommonMark.Base.csproj index 53da549..a6c6981 100644 --- a/CommonMark/CommonMark.Base.csproj +++ b/CommonMark/CommonMark.Base.csproj @@ -19,9 +19,18 @@ https://github.com/Knagis/CommonMark.NET Copyright © Kārlis Gaņģis 2014-2016 + CommonMark.NET + CommonMark.NET + Kārlis Gaņģis + https://raw.githubusercontent.com/Knagis/CommonMark.NET/master/LICENSE.md + https://github.com/Knagis/CommonMark.NET/ + https://raw.githubusercontent.com/dcurtis/markdown-mark/master/png/32x20.png + false + .NET library for converting Markdown documents to HTML according to the CommonMark specification. Optimized for maximum performance and targets every .NET version since 2.0, including PCL, Mono and .NET Core. + Fixed lists with tab characters and double trailing newlines. + CommonMark Markdown + true - ..\CommonMark.NET.nuspec - configuration=$(Configuration) @@ -69,4 +78,8 @@ + + + + \ No newline at end of file From ceeabcd4a95594dabf59d2d54e2a6beafbadc6b3 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Tue, 4 Dec 2018 09:09:35 -0600 Subject: [PATCH 6/6] Include symbols and sources in NuGet packages --- CommonMark.Console/CommonMark.Console.csproj | 8 ++++++++ CommonMark/CommonMark.Base.csproj | 2 ++ 2 files changed, 10 insertions(+) diff --git a/CommonMark.Console/CommonMark.Console.csproj b/CommonMark.Console/CommonMark.Console.csproj index 4d75087..ce31f4f 100644 --- a/CommonMark.Console/CommonMark.Console.csproj +++ b/CommonMark.Console/CommonMark.Console.csproj @@ -29,6 +29,8 @@ true true true + true + true @@ -69,4 +71,10 @@ + + + <_TargetPathsToSymbolsWithTfm Include="$(OutputPath)CommonMark.pdb" TargetFramework="$(TargetFramework)" /> + + + \ No newline at end of file diff --git a/CommonMark/CommonMark.Base.csproj b/CommonMark/CommonMark.Base.csproj index a6c6981..3cd402f 100644 --- a/CommonMark/CommonMark.Base.csproj +++ b/CommonMark/CommonMark.Base.csproj @@ -31,6 +31,8 @@ CommonMark Markdown true + true + true