AMQNET-588 Solution clean up
diff --git a/package.ps1 b/package.ps1
index 49db3d0..991145a 100644
--- a/package.ps1
+++ b/package.ps1
@@ -20,7 +20,8 @@
write-progress "Creating package directory." "Initializing..."
if (!(test-path package)) {
mkdir package
-} else {
+}
+else {
# Clean package content if exists
Remove-Item package\* -Recurse
}
@@ -33,12 +34,23 @@
write-progress "Packaging Application files." "Scanning..."
$zipfile = "$pkgdir\$pkgname-$pkgver-bin.zip"
- Compress-Archive -Path ..\LICENSE.txt, ..\NOTICE.txt -Update -DestinationPath $zipfile
+ Compress-Archive -Path ..\LICENSE.txt, ..\NOTICE.txt -Update -DestinationPath $zipfile
+ # clean up temp
+ Remove-Item temp -Recurse -ErrorAction Ignore
+
foreach ($framework in $frameworks) {
- Compress-Archive -Path $framework -Update -DestinationPath $zipfile
+ Copy-Item $framework -Destination temp\$framework -Recurse
+
+ # clean up third party binaries
+ Get-ChildItem temp -File -Exclude "*Apache.NMS*" -Recurse | Remove-Item -Recurse
+
+ Compress-Archive -Path "temp\$framework" -Update -DestinationPath $zipfile
}
+ # clean up temp
+ Remove-Item temp -Recurse -ErrorAction Inquire
+
Pop-Location
}
@@ -50,8 +62,8 @@
Remove-Item temp -Recurse -ErrorAction Ignore
# copy files to temp dir
-Copy-Item src\* -Destination temp\src -Recurse
-Copy-Item test\* -Destination temp\test -Recurse
+Copy-Item src -Destination temp\src -Recurse
+Copy-Item test -Destination temp\test -Recurse
# clean up debug artifacts if there are any
Get-ChildItem temp -Include bin, obj -Recurse | Remove-Item -Recurse