forked from ashfurrow/danger-ruby-swiftlint
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integrity validation when downloading Swiftlint (ashfurrow#162)
- Loading branch information
1 parent
3c8bbf4
commit 723bef6
Showing
3 changed files
with
17 additions
and
8 deletions.
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
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,11 @@ | ||
#!/bin/bash | ||
# frozen_string_literal: true | ||
|
||
mkdir -p ${DESTINATION} | ||
curl -s -L ${URL} -o ${ASSET} | ||
if [[ $(md5 -q ${ASSET}) != ${SWIFTLINT_MD5_HASH} ]]; then | ||
echo "Zip was corrupted, try again later." | ||
else | ||
unzip -o -q ${ASSET} -d ${DESTINATION} | ||
fi | ||
rm ${ASSET} |
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