Commit e42ef4af authored by Rich Prohaska's avatar Rich Prohaska

#126 fix upload to amazon s3 file list

parent 60267e61
...@@ -7,12 +7,12 @@ function usage() { ...@@ -7,12 +7,12 @@ function usage() {
# copy build files to amazon s3 # copy build files to amazon s3
function copy_to_s3() { function copy_to_s3() {
local s3_build_bucket=$1; local s3_release_bucket=$2 local s3_build_bucket=$1; local s3_release_bucket=$2; local mysql_distro=$3
local ts=$(date +%s) local ts=$(date +%s)
local ymd=$(date +%Y%m%d -d @$ts) local ymd=$(date +%Y%m%d -d @$ts)
local ym=$(date +%Y%m -d @$ts) local ym=$(date +%Y%m -d @$ts)
local exitcode=0; local r=0 local exitcode=0; local r=0
for f in $(find . -maxdepth 1 \( -name '*.tar.gz*' -o -name '*.rpm*' \) ) ; do for f in $(find . -maxdepth 1 \( -name $mysql_distro'*.tar.gz*' -o -name $mysql_distro'*.rpm*' \) ) ; do
f=$(basename $f) f=$(basename $f)
echo `date` s3put $s3_build_bucket $f echo `date` s3put $s3_build_bucket $f
s3put $s3_build_bucket $f $f s3put $s3_build_bucket $f $f
...@@ -33,7 +33,7 @@ function copy_to_s3() { ...@@ -33,7 +33,7 @@ function copy_to_s3() {
if [ $r != 0 ] ; then if [ $r != 0 ] ; then
exitcode=1 exitcode=1
else else
for f in $(find . -maxdepth 1 \( -name '*.tar.gz*' -o -name '*.rpm*' \) ) ; do for f in $(find . -maxdepth 1 \( -name $mysql_distro'*.tar.gz*' -o -name $mysql_distro'*.rpm*' \) ) ; do
f=$(basename $f) f=$(basename $f)
echo `date` s3copykey $s3_release_bucket-$git_tag $f echo `date` s3copykey $s3_release_bucket-$git_tag $f
s3copykey $s3_release_bucket-$git_tag $f $s3_build_bucket $f s3copykey $s3_release_bucket-$git_tag $f $s3_build_bucket $f
...@@ -99,7 +99,7 @@ done ...@@ -99,7 +99,7 @@ done
# copy to s3 # copy to s3
if [ $s3 != 0 ] ; then if [ $s3 != 0 ] ; then
copy_to_s3 $s3_build_bucket $s3_release_bucket copy_to_s3 $s3_build_bucket $s3_release_bucket $mysql_distro
if [ $? != 0 ] ; then exitcode=1; fi if [ $? != 0 ] ; then exitcode=1; fi
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment