code review comments

This commit is contained in:
Claudia Agache
2020-07-08 12:37:44 +03:00
parent 643fa96f1b
commit cc83d828d0
3 changed files with 14 additions and 10 deletions

View File

@@ -3,16 +3,15 @@
set -ev
outputFile="$TRAVIS_BUILD_DIR/$1/alf-installer.bin"
amzFile="/eu.dl.alfresco.com/release/enterprise/5.2/5.2.7/5.2.7.4/alfresco-content-services-installer-5.2.7.4-linux-x64.bin"
host="s3-eu-west-1.amazonaws.com"
contentType="binary/octet-stream"
dateValue=`TZ=GMT date -R`
stringToSign="GET\n\n${contentType}\n${dateValue}\n${amzFile}"
stringToSign="GET\n\n${contentType}\n${dateValue}\n$S3_INSTALLER_PATH"
signature=`echo -en ${stringToSign} | openssl sha1 -hmac $RELEASE_AWS_SECRET_KEY -binary | base64`
curl -H "Host: ${host}" \
-H "Date: ${dateValue}" \
-H "Content-Type: ${contentType}" \
-H "Authorization: AWS $RELEASE_AWS_ACCESS_KEY:${signature}" \
https://${host}${amzFile} -o ${outputFile}
https://${host}${S3_INSTALLER_PATH} -o ${outputFile}
ls "$TRAVIS_BUILD_DIR/$1"