File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,15 @@ process_data() {
4747 chronology/update.sh $DATADIR
4848 ./update_all.sh $DATADIR
4949 # Move database files from subdirectories to main data directory
50- aws s3 sync $DATADIR / s3://$AWS_S3_BUCKET /taginfo/$ENVIRONMENT / --exclude " *" --include " *.db"
50+ find $DATADIR -mindepth 2 -name " *.db" -type f -exec mv {} $DATADIR / \; 2> /dev/null || true
51+ # Upload only .db files from the main directory (not subdirectories)
52+ if ! aws s3 ls " s3://$AWS_S3_BUCKET /taginfo/$ENVIRONMENT " 2>&1 | grep -q ' An error occurred' ; then
53+ for db_file in $DATADIR /* .db; do
54+ if [ -f " $db_file " ]; then
55+ aws s3 cp " $db_file " " s3://$AWS_S3_BUCKET /taginfo/$ENVIRONMENT /$( basename " $db_file " ) "
56+ fi
57+ done
58+ fi
5159}
5260
5361# Compress files to download
You can’t perform that action at this time.
0 commit comments