Skip to content

Commit 4fa384b

Browse files
committed
Fix build script for *.pdb and empty directory issues.
1 parent bc8e793 commit 4fa384b

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

Pack.ps1

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,6 @@ if( $Rebuild )
1616

1717
$buildOptions += '/p:Configuration=Release'
1818

19-
&$builder $sln $buildOptions
20-
&$builder $slnCompat $buildOptions
21-
22-
$winFile = New-Object IO.FileInfo( ".\bin\portable-net45+win+wpa81\MsgPack.dll" )
23-
$xamarinFile = New-Object IO.FileInfo( ".\bin\monotouch\MsgPack.dll" )
24-
if( ( $winFile.LastWriteTime - $xamarinFile.LastWriteTime ).Days -ne 0 )
25-
{
26-
# It might that I forgot building in xamarin when winRT build and xamarin build last write time are differ more than 1day.
27-
Write-Error "Last write times between WinRT binary and Xamarin library are very differ. Do you forget to place latest Xamarin build (on Mac) or latest WinRT build (on Windows) on ./bin ?"
28-
return
29-
}
30-
31-
.\.nuget\nuget.exe pack $nuspec
32-
3319
# Unity
3420
if ( ![IO.Directory]::Exists( ".\MsgPack-CLI" ) )
3521
{
@@ -45,8 +31,24 @@ if ( ![IO.Directory]::Exists( ".\MsgPack-CLI\mpu" ) )
4531
New-Item .\MsgPack-CLI\mpu -Type Directory | Out-Null
4632
}
4733

48-
Copy-Item .\bin\* .\MsgPack-CLI\ -Recurse
34+
# build
35+
&$builder $sln $buildOptions
36+
&$builder $slnCompat $buildOptions
37+
38+
$winFile = New-Object IO.FileInfo( ".\bin\portable-net45+win+wpa81\MsgPack.dll" )
39+
$xamarinFile = New-Object IO.FileInfo( ".\bin\monotouch\MsgPack.dll" )
40+
if( ( $winFile.LastWriteTime - $xamarinFile.LastWriteTime ).Days -ne 0 )
41+
{
42+
# It might that I forgot building in xamarin when winRT build and xamarin build last write time are differ more than 1day.
43+
Write-Error "Last write times between WinRT binary and Xamarin library are very differ. Do you forget to place latest Xamarin build (on Mac) or latest WinRT build (on Windows) on ./bin ?"
44+
return
45+
}
46+
47+
.\.nuget\nuget.exe pack $nuspec
48+
49+
Copy-Item .\bin\* .\MsgPack-CLI\ -Recurse -Exclude @("*.vshost.*", "*.pdb")
4950
Copy-Item .\tools\mpu\bin\* .\MsgPack-CLI\mpu\ -Recurse -Exclude @("*.vshost.*", "*.pdb")
51+
Remove-Item .\MsgPack-CLI\ -Include *.pdb -Recurse
5052
[Reflection.Assembly]::LoadWithPartialName( "System.IO.Compression.FileSystem" ) | Out-Null
5153
# 'latest' should be rewritten with semver manually.
5254
if ( [IO.File]::Exists( ".\MsgPack.Cli.latest.zip" ) )

0 commit comments

Comments
 (0)