1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-09-03 10:53:25 +02:00

Improve deployment script (add file hash as sanity check).

This commit is contained in:
MetaPrime
2017-05-09 11:59:16 -07:00
parent 688e8f0e13
commit 40abb405e9
2 changed files with 17 additions and 1 deletions

16
deploy.ps1 Normal file
View File

@@ -0,0 +1,16 @@
Param (
[Parameter(Mandatory=$True)]
[string]$source,
[Parameter(Mandatory=$True)]
[string]$dest
)
Copy-Item -Path $source -Destination $dest
$sourceHash = (Get-FileHash $source -algorithm MD5).Hash
$destHash = (Get-FileHash $dest -algorithm MD5).Hash
if ($sourceHash -eq $destHash) {
Write-Output 'Deployed successfully.'
} else {
Write-Output 'Hash Mismatch: did you close ripme before deploying?'
}