Skip to content

Commit

Permalink
Add tesing option to do a dry-run
Browse files Browse the repository at this point in the history
  • Loading branch information
ntai-arxiv committed Sep 25, 2023
1 parent 8fb0e9f commit e774955
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions script/sync_prod_to_gcp/sync_published.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ if [ ! -d sync.venv ] ; then
make
fi

echo $1

# Is this a test/
if [ $1 = YES_THIS_IS_A_TEST ]
if [ "$1" = "YES_THIS_IS_A_TEST" ]
then
shift
TESTING_ARGS = -v -d --test
TESTING_ARGS="-v -d --test"
fi


Expand Down Expand Up @@ -38,7 +40,7 @@ export GOOGLE_APPLICATION_CREDENTIALS=~/arxiv-production-cred.json
python sync_published_to_gcp.py $TESTING_ARGS --json-log-dir $JSON_LOG_DIR /data/new/logs/publish_$DATE.log > sync_published_$DATE.report 2> sync_published_$DATE.err
deactivate

if [ "$TESTING_ARGS" != ""] ; then
if [ ! -z "$TESTING_ARGS" ]; then
exit 0
fi

Expand Down

0 comments on commit e774955

Please sign in to comment.