Skip to content

Commit

Permalink
Fixed list of files to upload for deploy.
Browse files Browse the repository at this point in the history
  • Loading branch information
brixen committed Dec 26, 2015
1 parent 57e638d commit a2d2919
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/deploy.sh
Expand Up @@ -35,15 +35,17 @@ function rbx_upload_files {
src=$3
path=${4:-}
url=$(rbx_url_prefix "$bucket")
file_exts=("" ".sha1" ".sha512")
file_exts=("" ".sha512")
index="index.txt"

rbx_s3_download "$url" "$index"

# Upload all the files first.
for ext in "${file_exts[@]}"; do
rbx_s3_upload "$url" "$bucket" "$dest$ext" "$src$ext" "$path" ||
fail "unable to upload file"
if [[ -f $src$ext ]]; then
rbx_s3_upload "$url" "$bucket" "$dest$ext" "$src$ext" "$path" ||
fail "unable to upload file"
fi
done

# Update the index and upload it.
Expand All @@ -54,7 +56,7 @@ function rbx_upload_files {
name="$dest$ext"
fi

grep "$name" "$index"
grep "^$name\$" "$index"
if [ $? -ne 0 ]; then
echo "$name" >> "$index"
fi
Expand Down

0 comments on commit a2d2919

Please sign in to comment.