Updated make to create two files sha256/sha256sum

Please link sha256sum as checksum file in GIT releases page for future release

Signed-off-by: Thilak Somasundaram <t2same@gmail.com>
pull/7277/head
Thilak Somasundaram 5 years ago
parent 5680f4d506
commit 560d6cdb3f

@ -156,7 +156,7 @@ sign:
.PHONY: checksum .PHONY: checksum
checksum: checksum:
for f in _dist/*.{gz,zip} ; do \ for f in _dist/*.{gz,zip} ; do \
shasum -a 256 "$${f}" > "$${f}.sha256" ; \ shasum -a 256 "$${f}" | tee "$${f}.sha256sum" | awk '{print $$1}' > "$${f}.sha256" ; \
done done
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------

@ -137,7 +137,7 @@ downloadFile() {
installFile() { installFile() {
HELM_TMP="$HELM_TMP_ROOT/$PROJECT_NAME" HELM_TMP="$HELM_TMP_ROOT/$PROJECT_NAME"
local sum=$(openssl sha1 -sha256 ${HELM_TMP_FILE} | awk '{print $2}') local sum=$(openssl sha1 -sha256 ${HELM_TMP_FILE} | awk '{print $2}')
local expected_sum=$(cat ${HELM_SUM_FILE} | awk '{print $1}') local expected_sum=$(cat ${HELM_SUM_FILE})
if [ "$sum" != "$expected_sum" ]; then if [ "$sum" != "$expected_sum" ]; then
echo "SHA sum of ${HELM_TMP_FILE} does not match. Aborting." echo "SHA sum of ${HELM_TMP_FILE} does not match. Aborting."
exit 1 exit 1

@ -133,7 +133,7 @@ downloadFile() {
installFile() { installFile() {
HELM_TMP="$HELM_TMP_ROOT/$PROJECT_NAME" HELM_TMP="$HELM_TMP_ROOT/$PROJECT_NAME"
local sum=$(openssl sha1 -sha256 ${HELM_TMP_FILE} | awk '{print $2}') local sum=$(openssl sha1 -sha256 ${HELM_TMP_FILE} | awk '{print $2}')
local expected_sum=$(cat ${HELM_SUM_FILE} | awk '{print $1}') local expected_sum=$(cat ${HELM_SUM_FILE})
if [ "$sum" != "$expected_sum" ]; then if [ "$sum" != "$expected_sum" ]; then
echo "SHA sum of ${HELM_TMP_FILE} does not match. Aborting." echo "SHA sum of ${HELM_TMP_FILE} does not match. Aborting."
exit 1 exit 1

Loading…
Cancel
Save