Skip to content

Commit

Permalink
deal with FileInUse exception when packing .zip
Browse files Browse the repository at this point in the history
  • Loading branch information
xupefei committed Jul 15, 2017
1 parent 0c02121 commit 5240a8e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion QuickLook.Installer/QuickLook.Installer.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ powershell -file "$(SolutionDir)Scripts\sign-package.ps1"
<PropertyGroup>
<PostBuildEvent>powershell -file "$(SolutionDir)Scripts\sign-msi.ps1"

powershell -file "$(SolutionDir)Scripts\rename-pkg.ps1"</PostBuildEvent>
powershell -file "$(SolutionDir)Scripts\rename-msi.ps1"

powershell -file "$(SolutionDir)Scripts\pack-zip.ps1"</PostBuildEvent>
</PropertyGroup>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
5 changes: 1 addition & 4 deletions Scripts/rename-pkg.ps1 → Scripts/pack-zip.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
$version = git describe --always --tags

Remove-Item ..\Build\QuickLook-$version.msi -ErrorAction SilentlyContinue
Remove-Item ..\Build\QuickLook-$version.zip -ErrorAction SilentlyContinue

Start-Sleep -s 1

Rename-Item ..\Build\QuickLook.msi QuickLook-$version.msi
Remove-Item ..\Build\QuickLook-$version.zip -ErrorAction SilentlyContinue
Compress-Archive ..\Build\Package\* ..\Build\QuickLook-$version.zip
4 changes: 4 additions & 0 deletions Scripts/rename-msi.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$version = git describe --always --tags

Remove-Item ..\Build\QuickLook-$version.msi -ErrorAction SilentlyContinue
Rename-Item ..\Build\QuickLook.msi QuickLook-$version.msi

0 comments on commit 5240a8e

Please sign in to comment.