forked from RipMeApp/ripme
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve deployment script (add file hash as sanity check).
- Loading branch information
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
@echo off | ||
xcopy /s/e/y target\*.jar %~dp0\ripme.jar | ||
powershell -c ".\deploy.ps1 -source (Join-Path target (Get-Item -Path .\target\* -Filter *.jar)[0].Name) -dest ripme.jar" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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?' | ||
} |