deal with FileInUse exception when packing .zip

This commit is contained in:
Paddy Xu
2017-07-15 15:33:56 +03:00
parent 0c021217b1
commit 5240a8e75b
3 changed files with 8 additions and 5 deletions

View File

@@ -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.

View File

@@ -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
Scripts/rename-msi.ps1 Normal file
View File

@@ -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