Skip to content

Commit dcbf622

Browse files
author
Kapil Borle
committed
Add a function create release build
1 parent c23e487 commit dcbf622

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

Utils/ReleaseMaker.psm1

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,7 @@ Function New-Release
7474
Update-ReleaseNotesInModuleManifest $newVer $oldVer
7575

7676
# build the module
77-
pushd $solutionRoot
78-
remove-item out/ -recurse -force
79-
dotnet restore
80-
.\buildCoreClr.ps1 -Framework net451 -Configuration Release -Build
81-
.\buildCoreClr.ps1 -Framework net451 -Configuration PSV3Release -Build
82-
.\buildCoreClr.ps1 -Framework netstandard1.6 -Configuration Release -Build
83-
.\build.ps1 -BuildDocs
84-
popd
85-
77+
New-ReleaseBuild
8678
}
8779

8880
function Get-VersionsFromChangeLog
@@ -94,6 +86,25 @@ function Get-VersionsFromChangeLog
9486
$versions
9587
}
9688

89+
function New-ReleaseBuild
90+
{
91+
$solutionPath = Get-SolutionPath
92+
pushd $solutionPath
93+
try
94+
{
95+
remove-item out/ -recurse -force
96+
dotnet restore
97+
.\buildCoreClr.ps1 -Framework net451 -Configuration Release -Build
98+
.\buildCoreClr.ps1 -Framework net451 -Configuration PSV3Release -Build
99+
.\buildCoreClr.ps1 -Framework netstandard1.6 -Configuration Release -Build
100+
.\build.ps1 -BuildDocs
101+
}
102+
finally
103+
{
104+
popd
105+
}
106+
}
107+
97108
function Update-ReleaseNotesInModuleManifest
98109
{
99110
[CmdletBinding()]
@@ -173,4 +184,5 @@ function Set-ContentUtf8NoBom {
173184
[System.IO.File]::WriteAllLines($path, $content, $utfNoBom)
174185
}
175186

176-
Export-ModuleMember -Function New-Release
187+
Export-ModuleMember -Function New-Release
188+
Export-ModuleMember -Function New-ReleaseBuild

0 commit comments

Comments
 (0)