Skip to content

Commit

Permalink
Version 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Abalov authored and Nick Abalov committed Sep 30, 2016
1 parent ad7a912 commit 1df984a
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 5 deletions.
64 changes: 64 additions & 0 deletions PrepareRelease.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
Function Build()
{
$msbuild=$env:MSBUILD
$solutionPath = Join-Path $solutionDir 'WindowsPhoneDriver.sln'

&$msbuild ($solutionPath, '/v:minimal', '/p:configuration=Release', '/t:Clean,Build')
if (!$?) {
Write-Host "Build failed. $?" -ForegroundColor Red
Exit 1
}
}

Function Clean()
{
Remove-Item $releaseDir -Force -Recurse
New-Item -ItemType directory -Path $releaseDir
}

Function PackNuGet ()
{
Write-Host "Packing Nuget package"
Get-ChildItem -Path $releaseDir -Filter "*.nupkg" | foreach ($_) { Remove-Item $_.FullName }

$nuget = Join-Path $solutionDir '.nuget\nuget.exe'

$innerServerProjectDir = Join-Path $solutionDir 'WindowsPhoneDriver.InnerDriver'
$innerServerprojectPath = Join-Path $innerServerProjectDir 'WindowsPhoneDriver.InnerDriver.csproj'

&$nuget ('pack', $innerServerprojectPath, '-IncludeReferencedProjects', '-Properties', 'Configuration=Release', '-OutputDirectory', $releaseDir)
}

Function PackRelease()
{
Add-Type -assembly "system.io.compression.filesystem"

$driverSourcePath = Join-Path $solutionDir "WindowsPhoneDriver.OuterDriver\Bin\Release"
$innerServerSourcePath = Join-Path $solutionDir "WindowsPhoneDriver.InnerDriver\Bin\Release"

Get-ChildItem -Path $releaseDir -Filter "*.zip" | foreach ($_) { Remove-Item $_.FullName }

[IO.Compression.ZipFile]::CreateFromDirectory($driverSourcePath, "$releaseDir/WindowsPhoneDriver.OuterDriver.zip")
[IO.Compression.ZipFile]::CreateFromDirectory($innerServerSourcePath, "$releaseDir/WindowsPhoneDriver.InnerDriver.zip")
}

$workspace=$PSScriptRoot
$releaseDir = Join-Path $workspace "Release"
$solutionDir=Join-Path $workspace "WindowsPhoneDriver"

Write-Host "Update CHANGELOG.md"
Write-Host "Update version in Assemblies"
Write-Host "Update version in NuSpec file"

Pause

Clean
Build
# Test
PackNuGet
PackRelease

Write-Host "Finished" -ForegroundColor Green
Write-Host "Publish NuGet package using nuget.exe push $releaseDir\WindowsPhoneDriver.InnerDriver.*.nupkg"
Write-Host "Add and push tag using git tag -a v*.*.* -m 'Version *.*.*'"
Write-Host "Upload and attach $releaseDir\*.zip files to release"
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// 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("0.1.*")]
[assembly: AssemblyVersion("0.3.1.*")]

[assembly: InternalsVisibleTo("WindowsPhoneDriver.OuterDriver")]
[assembly: InternalsVisibleTo("WindowsPhoneDriver.InnerDriver")]
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("0.3.0.*")]
[assembly: AssemblyFileVersion("0.3.0.0")]
[assembly: AssemblyVersion("0.3.1.*")]
[assembly: AssemblyFileVersion("0.3.1.0")]

[assembly: NeutralResourcesLanguageAttribute("en-US")]
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,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("0.3.0.*")]
[assembly: AssemblyFileVersion("0.3.0")]
[assembly: AssemblyVersion("0.3.1.*")]
[assembly: AssemblyFileVersion("0.3.1")]

0 comments on commit 1df984a

Please sign in to comment.