From 53c352318bbc78e56beea1da49911ea67a58d680 Mon Sep 17 00:00:00 2001 From: "Valeriano A.R" Date: Sun, 9 Jul 2017 23:46:46 +0200 Subject: [PATCH] Add NuGet building scripts. --- UrlCompressor.Tests/Program.cs | 1 + VAR.UrlCompressor.sln | 8 ++--- VAR.UrlCompressor/Build.NuGet.cmd | 30 +++++++++++++++++ VAR.UrlCompressor/Properties/AssemblyInfo.cs | 30 +++-------------- VAR.UrlCompressor/VAR.UrlCompressor.csproj | 35 ++++++++++++++++---- VAR.UrlCompressor/VAR.UrlCompressor.nuspec | 22 ++++++++++++ VAR.UrlCompressor/packages.config | 4 +++ 7 files changed, 94 insertions(+), 36 deletions(-) create mode 100644 VAR.UrlCompressor/Build.NuGet.cmd create mode 100644 VAR.UrlCompressor/VAR.UrlCompressor.nuspec create mode 100644 VAR.UrlCompressor/packages.config diff --git a/UrlCompressor.Tests/Program.cs b/UrlCompressor.Tests/Program.cs index e94949d..03143aa 100644 --- a/UrlCompressor.Tests/Program.cs +++ b/UrlCompressor.Tests/Program.cs @@ -13,6 +13,7 @@ namespace UrlCompressor.Tests TestUrl("https://twitter.com"); TestUrl("https://twitter.com/Kableado"); TestUrl("https://github.com/Kableado"); + TestUrl("https://varstudio.net"); Console.Read(); } diff --git a/VAR.UrlCompressor.sln b/VAR.UrlCompressor.sln index 65c7b0c..fcf3689 100644 --- a/VAR.UrlCompressor.sln +++ b/VAR.UrlCompressor.sln @@ -13,10 +13,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {016AE05D-12AF-40C6-8D0C-064970004F0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {016AE05D-12AF-40C6-8D0C-064970004F0B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {016AE05D-12AF-40C6-8D0C-064970004F0B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {016AE05D-12AF-40C6-8D0C-064970004F0B}.Release|Any CPU.Build.0 = Release|Any CPU + {016AE05D-12AF-40C6-8D0C-064970004F0B}.Debug|Any CPU.ActiveCfg = Debug .Net 4.6.1|Any CPU + {016AE05D-12AF-40C6-8D0C-064970004F0B}.Debug|Any CPU.Build.0 = Debug .Net 4.6.1|Any CPU + {016AE05D-12AF-40C6-8D0C-064970004F0B}.Release|Any CPU.ActiveCfg = Release .Net 4.6.1|Any CPU + {016AE05D-12AF-40C6-8D0C-064970004F0B}.Release|Any CPU.Build.0 = Release .Net 4.6.1|Any CPU {29D6812A-566D-4A92-A7A4-FC6AE0B3DB39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {29D6812A-566D-4A92-A7A4-FC6AE0B3DB39}.Debug|Any CPU.Build.0 = Debug|Any CPU {29D6812A-566D-4A92-A7A4-FC6AE0B3DB39}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/VAR.UrlCompressor/Build.NuGet.cmd b/VAR.UrlCompressor/Build.NuGet.cmd new file mode 100644 index 0000000..c92cc77 --- /dev/null +++ b/VAR.UrlCompressor/Build.NuGet.cmd @@ -0,0 +1,30 @@ +@echo off + +:: MSBuild and tools path +if exist "%windir%\Microsoft.Net\Framework\v4.0.30319" set MsBuildPath=%windir%\Microsoft.NET\Framework\v4.0.30319 +if exist "%windir%\Microsoft.Net\Framework64\v4.0.30319" set MsBuildPath=%windir%\Microsoft.NET\Framework64\v4.0.30319 +if exist "C:\Program Files (x86)\MSBuild\14.0\Bin" set MsBuildPath=C:\Program Files (x86)\MSBuild\14.0\Bin +if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin" set MsBuildPath=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin +set PATH=%MsBuildPath%;%PATH% + +echo %MsBuildPath% + +:: NuGet +set nuget="nuget" +if exist "%~dp0..\packages\NuGet.CommandLine.3.4.3\tools\NuGet.exe" set nuget="%~dp0\..\packages\NuGet.CommandLine.3.4.3\tools\NuGet.exe" +if exist "%~dp0..\packages\NuGet.CommandLine.4.1.0\tools\NuGet.exe" set nuget="%~dp0\..\packages\NuGet.CommandLine.4.1.0\tools\NuGet.exe" + +:: Release .Net 3.5 +Title Building Release .Net 3.5 +msbuild VAR.UrlCompressor.csproj /t:Build /p:Configuration="Release .Net 3.5" /p:Platform="AnyCPU" + +:: Release .Net 4.6.1 +Title Building Release .Net 4.6.1 +msbuild VAR.UrlCompressor.csproj /t:Build /p:Configuration="Release .Net 4.6.1" /p:Platform="AnyCPU" + +:: Packing Nuget +Title Packing Nuget +%nuget% pack VAR.UrlCompressor.csproj -Verbosity detailed -OutputDir "NuGet" -Properties Configuration="Release .Net 4.6.1" -Prop Platform=AnyCPU + +title Finished +pause diff --git a/VAR.UrlCompressor/Properties/AssemblyInfo.cs b/VAR.UrlCompressor/Properties/AssemblyInfo.cs index 32b984c..a6071fe 100644 --- a/VAR.UrlCompressor/Properties/AssemblyInfo.cs +++ b/VAR.UrlCompressor/Properties/AssemblyInfo.cs @@ -1,36 +1,14 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// La información general de un ensamblado se controla mediante el siguiente -// conjunto de atributos. Cambie estos valores de atributo para modificar la información -// asociada con un ensamblado. [assembly: AssemblyTitle("VAR.UrlCompressor")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyDescription(".Net library for compressing URLs")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] +[assembly: AssemblyCompany("VAR")] [assembly: AssemblyProduct("VAR.UrlCompressor")] -[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyCopyright("Copyright © VAR 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] - -// Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles -// para los componentes COM. Si es necesario obtener acceso a un tipo en este ensamblado desde -// COM, establezca el atributo ComVisible en true en este tipo. [assembly: ComVisible(false)] - -// El siguiente GUID sirve como id. de typelib si este proyecto se expone a COM. [assembly: Guid("016ae05d-12af-40c6-8d0c-064970004f0b")] - -// La información de versión de un ensamblado consta de los cuatro valores siguientes: -// -// Versión principal -// Versión secundaria -// Número de compilación -// Revisión -// -// Puede especificar todos los valores o usar los números de compilación y de revisión predeterminados -// mediante el carácter "*", como se muestra a continuación: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.0.*")] diff --git a/VAR.UrlCompressor/VAR.UrlCompressor.csproj b/VAR.UrlCompressor/VAR.UrlCompressor.csproj index cadc461..edc7259 100644 --- a/VAR.UrlCompressor/VAR.UrlCompressor.csproj +++ b/VAR.UrlCompressor/VAR.UrlCompressor.csproj @@ -12,31 +12,49 @@ v4.5.2 512 - + true full false - bin\Debug\ + bin\Debug\net461\ DEBUG;TRACE prompt 4 + v4.6.1 - + pdbonly true - bin\Release\ + bin\Release\net461\ TRACE prompt 4 + v4.6.1 + + + true + bin\Debug\net35\ + DEBUG;TRACE + full + AnyCPU + prompt + v3.5 + + + bin\Release\net35\ + TRACE + true + pdbonly + AnyCPU + prompt + v3.5 - - @@ -46,5 +64,10 @@ + + + + + \ No newline at end of file diff --git a/VAR.UrlCompressor/VAR.UrlCompressor.nuspec b/VAR.UrlCompressor/VAR.UrlCompressor.nuspec new file mode 100644 index 0000000..b21de39 --- /dev/null +++ b/VAR.UrlCompressor/VAR.UrlCompressor.nuspec @@ -0,0 +1,22 @@ + + + + $id$ + $version$ + $title$ + $author$ + $author$ + https://github.com/Kableado/VAR.UrlCompressor/blob/master/LICENSE.txt + https://github.com/Kableado/VAR.UrlCompressor + false + $description$ + Copyright VAR 2017 + URL Compression Library + + + + + + + + \ No newline at end of file diff --git a/VAR.UrlCompressor/packages.config b/VAR.UrlCompressor/packages.config new file mode 100644 index 0000000..fc48570 --- /dev/null +++ b/VAR.UrlCompressor/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file