From d59443ff18e6a77c3f97e4e29312c563a6cbc399 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Sun, 26 Aug 2018 01:01:08 +0000 Subject: [PATCH] add profile support in the go_executable_build.sh script use a harmony-s3 profile in aws setting for s3 access only Signed-off-by: Leo Chen --- go_executable_build.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/go_executable_build.sh b/go_executable_build.sh index d64b56a5e..ba0995629 100755 --- a/go_executable_build.sh +++ b/go_executable_build.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash + GOOS=linux GOARCH=amd64 env GOOS=$GOOS GOARCH=$GOARCH go build -o bin/benchmark benchmark.go @@ -6,8 +7,13 @@ env GOOS=$GOOS GOARCH=$GOARCH go build -o bin/soldier aws-experiment-launch/expe env GOOS=$GOOS GOARCH=$GOARCH go build -o bin/commander aws-experiment-launch/experiment/commander/main.go env GOOS=$GOOS GOARCH=$GOARCH go build -o bin/txgen client/txgen/main.go -aws s3 cp bin/benchmark s3://unique-bucket-bin/benchmark --acl public-read-write -aws s3 cp bin/soldier s3://unique-bucket-bin/soldier --acl public-read-write -aws s3 cp bin/commander s3://unique-bucket-bin/commander --acl public-read-write -aws s3 cp bin/txgen s3://unique-bucket-bin/txgen --acl public-read-write -aws s3 cp kill_node.sh s3://unique-bucket-bin/kill_node.sh --acl public-read-write \ No newline at end of file +AWSCLI=aws +if [ "$1" != "" ]; then + AWSCLI+=" --profile $1" +fi + +$AWSCLI s3 cp bin/benchmark s3://unique-bucket-bin/benchmark --acl public-read-write +$AWSCLI s3 cp bin/soldier s3://unique-bucket-bin/soldier --acl public-read-write +$AWSCLI s3 cp bin/commander s3://unique-bucket-bin/commander --acl public-read-write +$AWSCLI s3 cp bin/txgen s3://unique-bucket-bin/txgen --acl public-read-write +$AWSCLI s3 cp kill_node.sh s3://unique-bucket-bin/kill_node.sh --acl public-read-write