diff --git a/deploy.bat b/deploy.bat index acf93888..388ece44 100644 --- a/deploy.bat +++ b/deploy.bat @@ -1,2 +1,2 @@ @echo off -xcopy /s/e/y target\*.jar %~dp0\ripme.jar \ No newline at end of file +powershell -c ".\deploy.ps1 -source (Join-Path target (Get-Item -Path .\target\* -Filter *.jar)[0].Name) -dest ripme.jar" diff --git a/deploy.ps1 b/deploy.ps1 new file mode 100644 index 00000000..9124c241 --- /dev/null +++ b/deploy.ps1 @@ -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?' +}