diff --git a/build/nuspec/SharpGLforWPF/SharpGLforWPF.nuspec b/build/nuspec/SharpGLforWPF/SharpGLforWPF.nuspec index 603a794c..d0a04b72 100644 --- a/build/nuspec/SharpGLforWPF/SharpGLforWPF.nuspec +++ b/build/nuspec/SharpGLforWPF/SharpGLforWPF.nuspec @@ -1,18 +1,18 @@  - - SharpGLforWPF - 2.1.0 - SharpGL for WPF - Dave Kerr - - http://sharpgl.codeplex.com - false - SharpGL wraps the popular OpenGL library. This package installs SharpGL and the WPF controls. - SharpGL wraps the popular OpenGL library. This package installs SharpGL and the WPF controls. - Copyright © Dave Kerr 2013 - - - - + + SharpGLforWPF + 2.1.0 + SharpGL for WPF + Dave Kerr + + http://sharpgl.codeplex.com + false + SharpGL wraps the popular OpenGL library. This package installs SharpGL and the WPF controls. + SharpGL wraps the popular OpenGL library. This package installs SharpGL and the WPF controls. + Copyright © Dave Kerr 2013 + + + + \ No newline at end of file diff --git a/build/nuspec/SharpGLforWinForms/SharpGLforWinForms.nuspec b/build/nuspec/SharpGLforWinForms/SharpGLforWinForms.nuspec index 779fed95..3e1a9a5b 100644 --- a/build/nuspec/SharpGLforWinForms/SharpGLforWinForms.nuspec +++ b/build/nuspec/SharpGLforWinForms/SharpGLforWinForms.nuspec @@ -1,18 +1,18 @@  - - SharpGLforWinForms - 2.1.0 - SharpGL for WinForms - Dave Kerr - - http://sharpgl.codeplex.com - false - SharpGL wraps the popular OpenGL library. This package installs SharpGL and the WinForms controls. - SharpGL wraps the popular OpenGL library. This package installs SharpGL and the WinForms controls. - Copyright © Dave Kerr 2013 - - - - + + SharpGLforWinForms + 2.1.0 + SharpGL for WinForms + Dave Kerr + + http://sharpgl.codeplex.com + false + SharpGL wraps the popular OpenGL library. This package installs SharpGL and the WinForms controls. + SharpGL wraps the popular OpenGL library. This package installs SharpGL and the WinForms controls. + Copyright © Dave Kerr 2013 + + + + \ No newline at end of file diff --git a/release/BuildRelease.ps1 b/release/BuildRelease.ps1 index 92834f85..c5d4da2c 100644 --- a/release/BuildRelease.ps1 +++ b/release/BuildRelease.ps1 @@ -28,7 +28,7 @@ $folderBinariesSharpGLSceneGraph = Join-Path $folderSharpGLRoot "Core\SharpGL.Sc $folderBinariesSharpGLSerialization = Join-Path $folderSharpGLRoot "Core\SharpGL.Serialization\bin\Release" $folderBinariesSharpGLWinForms = Join-Path $folderSharpGLRoot "Core\SharpGL.WinForms\bin\Release" $folderBinariesSharpGLWPF = Join-Path $folderSharpGLRoot "Core\SharpGL.WPF\bin\Release" -$releaseVersion = [Reflection.Assembly]::LoadFile((Join-Path $folderBinariesSharpGL "SharpGL.dll")).GetName().Version +$releaseVersion = [Reflection.Assembly]::LoadFile((Join-Path $folderBinariesSharpGL "SharpGL.dll")).GetName().Version.ToString() Write-Host "Built Core Libraries. Release Version: $releaseVersion" # Part 3 - Copy the core libraries to the release. @@ -132,13 +132,18 @@ EnsureEmptyFolderExists($folderReleasePackages) $nuget = Join-Path $scriptParentPath "Resources\nuget.exe" CopyItems (Join-Path $folderReleaseCore "SharpGL.SceneGraph\*.*") (Join-Path $folderNuspecRoot "SharpGLCore\lib\net40") -. $nuget pack (Join-Path $folderNuspecRoot "SharpGLCore\SharpGLCore.nuspec") -Version $releaseVersion -OutputDirectory $folderReleasePackages +$nuspecPath = (Join-Path $folderNuspecRoot "SharpGLCore\SharpGLCore.nuspec") +. $nuget pack $nuspecPath -Version $releaseVersion -OutputDirectory $folderReleasePackages CopyItems (Join-Path $folderReleaseCore "SharpGL.WinForms\SharpGL.WinForms.*") (Join-Path $folderNuspecRoot "SharpGLforWinForms\lib\net40") -. $nuget pack (Join-Path $folderNuspecRoot "SharpGLforWinForms\SharpGLforWinForms.nuspec") -Version $releaseVersion -OutputDirectory $folderReleasePackages +$nuspecPath = (Join-Path $folderNuspecRoot "SharpGLforWinForms\SharpGLforWinForms.nuspec") +SetNuspecDependencyVersion $nuspecPath "SharpGLCore" $releaseVersion +. $nuget pack $nuspecPath -Version $releaseVersion -OutputDirectory $folderReleasePackages CopyItems (Join-Path $folderReleaseCore "SharpGL.WPF\SharpGL.WPF.*") (Join-Path $folderNuspecRoot "SharpGLforWPF\lib\net40") -. $nuget pack (Join-Path $folderNuspecRoot "SharpGLforWPF\SharpGLforWPF.nuspec") -Version $releaseVersion -OutputDirectory $folderReleasePackages +$nuspecPath = (Join-Path $folderNuspecRoot "SharpGLforWPF\SharpGLforWPF.nuspec") +SetNuspecDependencyVersion $nuspecPath "SharpGLCore" $releaseVersion +. $nuget pack $nuspecPath -Version $releaseVersion -OutputDirectory $folderReleasePackages # We're done! Write-Host "Successfully built version: $releaseVersion" \ No newline at end of file diff --git a/release/Resources/PowershellFunctions.ps1 b/release/Resources/PowershellFunctions.ps1 index 3a2094c1..d7395bae 100644 --- a/release/Resources/PowershellFunctions.ps1 +++ b/release/Resources/PowershellFunctions.ps1 @@ -13,7 +13,7 @@ function EnsureFolderExists($folder) { # Create the any folders or subfolders up to the destination that don't exist. if (!(Test-Path -path $folder)) { - New-Item $folder -Type Directory + New-Item $folder -Type Directory | Out-Null } } @@ -22,4 +22,22 @@ function EnsureEmptyFolderExists($folder) { EnsureFolderExists($folder) Remove-Item -Recurse -Force $folder EnsureFolderExists($folder) +} + +# Sets the version of a dependency in a nuspec. +# e.g: +# SetNuspecDependencyVersion "SharpGLforWinForms.nuspec" "SharpGLCore" "2.3.0.1" +function SetNuspecDependencyVersion($nuspecPath, $dependencyId, $version) { + + $nuspecXml = New-Object XML + $nuspecXml.Load($nuspecPath) + + # Loop through the dependencies, looking for the one with the specfied id. + foreach($dependency in $nuspecXml.package.metadata.dependencies.ChildNodes) { + if($dependency.id -eq $dependencyId) { + $dependency.version = $version + } + } + + $nuspecXml.Save($nuspecPath) } \ No newline at end of file diff --git a/source/SharpGL/SharedAssemblyInfo.cs b/source/SharpGL/SharedAssemblyInfo.cs index d34c59f9..bfa019b7 100644 --- a/source/SharpGL/SharedAssemblyInfo.cs +++ b/source/SharpGL/SharedAssemblyInfo.cs @@ -16,5 +16,5 @@ // 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("2.3.0.0")] -[assembly: AssemblyFileVersion("2.3.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("2.3.0.1")] +[assembly: AssemblyFileVersion("2.3.0.1")] \ No newline at end of file