TryGhost/Ghost-Config — pull request #30 by dennisroche (2014-09-12 00:22:55+00:00)
Title: Fixes to the Powershell scripts that package Package Ghost for Azure

@felixrieseberg I have a few more changes to the Powershell script I contributed last week.

Changes to the `Package.ps1` script.
- Added external dependency on [Ionic.Zip](http://dotnetzip.codeplex.com/) (`Ionic.Zip.Reduced.dll`) as the `System.IO.Compression.FileSystem` created an archive that wasn't able to be read by Web Deploy1 (and I assume by the Azure Web App Gallery). This was meant to be in the previous pull-request, however was accidentally lost when squashing the commits for PR.
- Clean-up temporary packaging files at end of script, unless` -Debug` flag is specified.
- Added `Pop-Location` if there was an error to return host to starting directory.
- `UTF8` output from `npm` was causing the Powershell console to error 2 if using the `-Verbose` flag, so now the script strips out `UTF8` characters using regex replace. Interesting the Powershell ISE handled the error, which is why I didn't notice it before.

Changes to the `Deploy.ps1` script.
- Removed SUCCESS message as it was misleading. It would print regardless of the deployment status.

1 `Error Code: ERROR_EXCEPTION_WHILE_CREATING_OBJECT`
2 `The Win32 internal error "A device attached to the system is not functioning" 0x1F occurred while writing to the console output buffer at the current cursor position.`