Last active
August 26, 2017 13:05
-
-
Save davlgd/d6a10e12257fffcc5d61c1ffe303ec27 to your computer and use it in GitHub Desktop.
Powershell script to zip files from a Visual Studio build to
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd "$(TargetDir)" | |
powershell.exe -ExecutionPolicy Unrestricted -f "Zip Hash and Sign.ps1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New-Item -ItemType Directory -Force -Path Final | |
$appPath = (get-item $pwd).parent.parent.FullName | |
$fileName = (Split-Path -Leaf -Path $appPath) + ".zip" | |
$fullName = $pwd.Path + "\Final\" + $fileName | |
Compress-Archive *.dll -Force $fullName | |
Compress-Archive *.exe -Update $fullName | |
Compress-Archive *.config -Update $fullName | |
(Get-FileHash $fullName -Algorithm SHA256).hash + " *" + $fileName > ($fullName + ".sha256") | |
(Get-FileHash $fullName -Algorithm SHA512).hash + " *" + $fileName > ($fullName + ".sha512") | |
gpg --yes --armor -b $fullName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment