File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,19 @@ check_md5() {
4040}
4141
4242s3_cp () {
43+ profile=" "
44+ if [[ ! -z " ${AWS_PROFILE} " ]]; then
45+ profile=" --profile=${AWS_PROFILE} "
46+ fi
47+ acl=" public-read"
48+ if [[ ! -z " ${S3_ACL_OVERRIDE} " ]]; then
49+ acl=" ${S3_ACL_OVERRIDE} "
50+ fi
51+ echo " Copying ${1} to ${2} "
52+ aws ${profile} s3 cp " ${1} " " ${2} " " --acl=${acl} "
53+ }
54+
55+ s3_pull_push () {
4356 profile=" "
4457 if [[ ! -z " ${AWS_PROFILE} " ]]; then
4558 profile=" --profile=${AWS_PROFILE} "
Original file line number Diff line number Diff line change @@ -43,11 +43,11 @@ usage() {
4343publish_s3 () {
4444 for tag in ${ARTIFACT_TAG_VERSION} ${ARTIFACT_TAG_SHA} ${ARTIFACT_TAG_LATEST} ; do
4545 echo " Publishing as ecs-cli-linux-amd64-${tag} "
46- dexec s3_cp " s3://${STAGE_S3_BUCKET} /ecs-cli-linux-amd64-${tag} " " s3://${PUBLISH_S3_BUCKET} /ecs-cli-linux-amd64-${tag} "
47- dexec s3_cp " s3://${STAGE_S3_BUCKET} /ecs-cli-linux-amd64-${tag} .md5" " s3://${PUBLISH_S3_BUCKET} /ecs-cli-linux-amd64-${tag} .md5"
46+ dexec s3_pull_push " s3://${STAGE_S3_BUCKET} /ecs-cli-linux-amd64-${tag} " " s3://${PUBLISH_S3_BUCKET} /ecs-cli-linux-amd64-${tag} "
47+ dexec s3_pull_push " s3://${STAGE_S3_BUCKET} /ecs-cli-linux-amd64-${tag} .md5" " s3://${PUBLISH_S3_BUCKET} /ecs-cli-linux-amd64-${tag} .md5"
4848 echo " Publishing as ecs-cli-darwin-amd64-${tag} "
49- dexec s3_cp " s3://${STAGE_S3_BUCKET} /ecs-cli-darwin-amd64-${tag} " " s3://${PUBLISH_S3_BUCKET} /ecs-cli-darwin-amd64-${tag} "
50- dexec s3_cp " s3://${STAGE_S3_BUCKET} /ecs-cli-darwin-amd64-${tag} .md5" " s3://${PUBLISH_S3_BUCKET} /ecs-cli-darwin-amd64-${tag} .md5"
49+ dexec s3_pull_push " s3://${STAGE_S3_BUCKET} /ecs-cli-darwin-amd64-${tag} " " s3://${PUBLISH_S3_BUCKET} /ecs-cli-darwin-amd64-${tag} "
50+ dexec s3_pull_push " s3://${STAGE_S3_BUCKET} /ecs-cli-darwin-amd64-${tag} .md5" " s3://${PUBLISH_S3_BUCKET} /ecs-cli-darwin-amd64-${tag} .md5"
5151 done
5252}
5353
You can’t perform that action at this time.
0 commit comments