From dd1139cabf31027f6350763b99318cddeb681542 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 11 Feb 2020 13:48:43 +1100 Subject: [PATCH] Builds a release for Examine.AzureDirectory - first real release --- build/Build-Release.ps1 | 46 ++++++++----------- build/Nuspecs/Examine/web.config.transform | 18 -------- build/build.xml | 2 +- .../Examine.AzureDirectory.csproj | 1 + .../Examine.AzureDirectory.nuspec | 4 +- .../Properties/AssemblyInfo.cs | 6 +-- src/Examine.sln | 19 +------- src/Examine/Examine.csproj | 1 + {build/Nuspecs => src}/Examine/Examine.nuspec | 46 +++++++++---------- src/Examine/Properties/AssemblyInfo.cs | 6 +-- src/SolutionInfo.cs | 2 +- 11 files changed, 55 insertions(+), 96 deletions(-) delete mode 100644 build/Nuspecs/Examine/web.config.transform rename {build/Nuspecs => src}/Examine.AzureDirectory/Examine.AzureDirectory.nuspec (84%) rename {build/Nuspecs => src}/Examine/Examine.nuspec (89%) diff --git a/build/Build-Release.ps1 b/build/Build-Release.ps1 index d8d720bea..ccc2a1a9e 100644 --- a/build/Build-Release.ps1 +++ b/build/Build-Release.ps1 @@ -43,12 +43,9 @@ else { mv "$dir\$file" $vswhere } - $MSBuild = &$vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath - if ($MSBuild) { - $MSBuild = join-path $MSBuild 'MSBuild\15.0\Bin\MSBuild.exe' - if (-not (test-path $msbuild)) { - throw "MSBuild not found!" - } + $MSBuild = &$vswhere -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe | select-object -first 1 + if (-not (test-path $MSBuild)) { + throw "MSBuild not found!" } } @@ -62,7 +59,7 @@ $buildXmlFile = (Join-Path $BuildFolder "build.xml") $SolutionInfoPath = Join-Path -Path $SolutionRoot -ChildPath "SolutionInfo.cs" # Set the copyright -$Copyright = "Copyright © Shannon Deminick " + (Get-Date).year +$Copyright = "Copyright " + [char]0x00A9 + " Shannon Deminick " + (Get-Date).year (gc -Path $SolutionInfoPath) ` -replace "(?<=AssemblyCopyright\(`").*(?=`"\))", $Copyright | sc -Path $SolutionInfoPath -Encoding UTF8 @@ -80,19 +77,22 @@ foreach($project in $root.ChildNodes) { $projectPath = Join-Path -Path $SolutionRoot -ChildPath $project.id $projectAssemblyInfo = Join-Path -Path $projectPath -ChildPath "Properties\AssemblyInfo.cs" - $projectVersion = $project.version.Split("-")[0]; - Write-Host "Updating verion for $projectPath to $($project.version) ($projectVersion)" + if (Test-Path -Path $projectAssemblyInfo){ + $projectVersion = $project.version.Split("-")[0]; - #update assembly infos with correct version + Write-Host "Updating verion for $projectPath to $($project.version) ($projectVersion)" - (gc -Path $projectAssemblyInfo) ` - -replace "(?<=Version\(`")[.\d]*(?=`"\))", "$projectVersion.0" | - sc -Path $projectAssemblyInfo -Encoding UTF8 + #update assembly infos with correct version - (gc -Path $projectAssemblyInfo) ` - -replace "(?<=AssemblyInformationalVersion\(`")[.\w-]*(?=`"\))", $project.version | - sc -Path $projectAssemblyInfo -Encoding UTF8 + (gc -Path $projectAssemblyInfo) ` + -replace "(?<=Version\(`")[.\d]*(?=`"\))", "$projectVersion.0" | + sc -Path $projectAssemblyInfo -Encoding UTF8 + + (gc -Path $projectAssemblyInfo) ` + -replace "(?<=AssemblyInformationalVersion\(`")[.\w-]*(?=`"\))", $project.version | + sc -Path $projectAssemblyInfo -Encoding UTF8 + } } # Build the solution in release mode @@ -108,18 +108,8 @@ if (-not $?) } # Iterate projects and output them -$include = @('*Examine*.dll','*Examine*.pdb','*Lucene*.dll','ICSharpCode.SharpZipLib.dll') -foreach($project in $root.ChildNodes) { - $projectRelease = Join-Path -Path $ReleaseFolder -ChildPath "$($project.id)"; - New-Item $projectRelease -Type directory - - $projectBin = Join-Path -Path $SolutionRoot -ChildPath "$($project.id)\bin\Release"; - Copy-Item "$projectBin\*.*" -Destination $projectRelease -Include $include - - $nuSpecSource = Join-Path -Path $BuildFolder -ChildPath "Nuspecs\$($project.id)\*"; - Copy-Item $nuSpecSource -Destination $projectRelease - $nuSpec = Join-Path -Path $projectRelease -ChildPath "$($project.id).nuspec"; - +foreach($project in $root.ChildNodes) { + $nuSpec = Join-Path -Path $SolutionRoot -ChildPath "$($project.id)\$($project.id).nuspec"; & $NuGet pack $nuSpec -OutputDirectory $ReleaseFolder -Version $project.version -Properties copyright=$Copyright } diff --git a/build/Nuspecs/Examine/web.config.transform b/build/Nuspecs/Examine/web.config.transform deleted file mode 100644 index c6bb16981..000000000 --- a/build/Nuspecs/Examine/web.config.transform +++ /dev/null @@ -1,18 +0,0 @@ - - - -
-
- - - - - - - - - - - - - \ No newline at end of file diff --git a/build/build.xml b/build/build.xml index ce1443f4b..15f5d364b 100644 --- a/build/build.xml +++ b/build/build.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/src/Examine.AzureDirectory/Examine.AzureDirectory.csproj b/src/Examine.AzureDirectory/Examine.AzureDirectory.csproj index 2202e93af..b2202859a 100644 --- a/src/Examine.AzureDirectory/Examine.AzureDirectory.csproj +++ b/src/Examine.AzureDirectory/Examine.AzureDirectory.csproj @@ -88,6 +88,7 @@ + diff --git a/build/Nuspecs/Examine.AzureDirectory/Examine.AzureDirectory.nuspec b/src/Examine.AzureDirectory/Examine.AzureDirectory.nuspec similarity index 84% rename from build/Nuspecs/Examine.AzureDirectory/Examine.AzureDirectory.nuspec rename to src/Examine.AzureDirectory/Examine.AzureDirectory.nuspec index 1e97883c6..f1cb9cf4f 100644 --- a/build/Nuspecs/Examine.AzureDirectory/Examine.AzureDirectory.nuspec +++ b/src/Examine.AzureDirectory/Examine.AzureDirectory.nuspec @@ -19,7 +19,7 @@ - - + + \ No newline at end of file diff --git a/src/Examine.AzureDirectory/Properties/AssemblyInfo.cs b/src/Examine.AzureDirectory/Properties/AssemblyInfo.cs index 37e436cec..42270534f 100644 --- a/src/Examine.AzureDirectory/Properties/AssemblyInfo.cs +++ b/src/Examine.AzureDirectory/Properties/AssemblyInfo.cs @@ -28,6 +28,6 @@ // 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: AssemblyInformationalVersion("1.0.0-beta05")] +[assembly: AssemblyVersion("0.1.90.0")] +[assembly: AssemblyFileVersion("0.1.90.0")] +[assembly: AssemblyInformationalVersion("0.1.90")] diff --git a/src/Examine.sln b/src/Examine.sln index bb191b99c..a6111c9a1 100644 --- a/src/Examine.sln +++ b/src/Examine.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26430.15 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29521.150 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8F5756F2-7449-400C-BE52-A91F862967B0}" ProjectSection(SolutionItems) = preProject @@ -21,12 +21,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{EE632768 ..\build\build.xml = ..\build\build.xml EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examine", "Examine", "{976F400B-2ABA-4C36-8FD6-B0B35D0911D0}" - ProjectSection(SolutionItems) = preProject - ..\build\Nuspecs\Examine\Examine.nuspec = ..\build\Nuspecs\Examine\Examine.nuspec - ..\build\Nuspecs\Examine\web.config.transform = ..\build\Nuspecs\Examine\web.config.transform - EndProjectSection -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UmbracoExamine", "UmbracoExamine\UmbracoExamine.csproj", "{07FBC26B-2927-4A22-8D96-D644C667FECC}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examine", "Examine\Examine.csproj", "{DA5E35C3-89BA-4A2E-A559-32CF7B23CBFF}" @@ -37,11 +31,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examine.Web.Demo", "Examine EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examine.AzureDirectory", "Examine.AzureDirectory\Examine.AzureDirectory.csproj", "{C3880B59-8B08-4990-B3FA-0A8DB9476319}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examine.AzureDirectory", "Examine.AzureDirectory", "{1667E2A1-051D-48F6-A2DE-301788613870}" - ProjectSection(SolutionItems) = preProject - ..\build\Nuspecs\Examine.AzureDirectory\Examine.AzureDirectory.nuspec = ..\build\Nuspecs\Examine.AzureDirectory\Examine.AzureDirectory.nuspec - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -72,10 +61,6 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {976F400B-2ABA-4C36-8FD6-B0B35D0911D0} = {EE632768-6ECD-40EF-84BD-5594670EA7A8} - {1667E2A1-051D-48F6-A2DE-301788613870} = {EE632768-6ECD-40EF-84BD-5594670EA7A8} - EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {1FD5A35C-59D2-4BF3-B524-2F84242A42AA} EndGlobalSection diff --git a/src/Examine/Examine.csproj b/src/Examine/Examine.csproj index cf5e3366b..7fc01d6b2 100644 --- a/src/Examine/Examine.csproj +++ b/src/Examine/Examine.csproj @@ -199,6 +199,7 @@ Designer + diff --git a/build/Nuspecs/Examine/Examine.nuspec b/src/Examine/Examine.nuspec similarity index 89% rename from build/Nuspecs/Examine/Examine.nuspec rename to src/Examine/Examine.nuspec index d109bece4..a59a30455 100644 --- a/build/Nuspecs/Examine/Examine.nuspec +++ b/src/Examine/Examine.nuspec @@ -1,24 +1,24 @@ - - - - Examine - 0.0.0.0 - Examine - Shannon Deminick - Shannon Deminick - https://github.com/Shazwazza/Examine - http://www.opensource.org/licenses/ms-pl - false - Examine is a wrapper for getting a Lucene index up and running for any type of data and comes with an API to search it. You can either use the Fluent API that the library comes with or use raw Lucene query syntax. The indexing is configurable and will allow both synchronous and asynchronous indexing and everything works happily in web projects too. - Examine is a wrapper for getting a Lucene index up and running for any type of data and comes with an API to search it - examine search lucene - $copyright$ - - - - - - - - + + + + Examine + 0.0.0.0 + Examine + Shannon Deminick + Shannon Deminick + https://github.com/Shazwazza/Examine + http://www.opensource.org/licenses/ms-pl + false + Examine is a wrapper for getting a Lucene index up and running for any type of data and comes with an API to search it. You can either use the Fluent API that the library comes with or use raw Lucene query syntax. The indexing is configurable and will allow both synchronous and asynchronous indexing and everything works happily in web projects too. + Examine is a wrapper for getting a Lucene index up and running for any type of data and comes with an API to search it + examine search lucene + $copyright$ + + + + + + + + \ No newline at end of file diff --git a/src/Examine/Properties/AssemblyInfo.cs b/src/Examine/Properties/AssemblyInfo.cs index 14a52f086..0f85881ee 100644 --- a/src/Examine/Properties/AssemblyInfo.cs +++ b/src/Examine/Properties/AssemblyInfo.cs @@ -26,6 +26,6 @@ [assembly: AllowPartiallyTrustedCallers] -[assembly: AssemblyVersion("0.1.89.0")] -[assembly: AssemblyFileVersion("0.1.89.0")] -[assembly: AssemblyInformationalVersion("0.1.89")] +[assembly: AssemblyVersion("0.1.90.0")] +[assembly: AssemblyFileVersion("0.1.90.0")] +[assembly: AssemblyInformationalVersion("0.1.90")] diff --git a/src/SolutionInfo.cs b/src/SolutionInfo.cs index b96fd26dd..69e8065f7 100644 --- a/src/SolutionInfo.cs +++ b/src/SolutionInfo.cs @@ -2,6 +2,6 @@ using System.Security; [assembly: AssemblyCompany("Shannon Deminick")] -[assembly: AssemblyCopyright("Copyright © Shannon Deminick 2018")] +[assembly: AssemblyCopyright("Copyright © Shannon Deminick 2020")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")]