Changeset - d5e4646ca521
[Not reviewed]
0 1 0
Brett Smith (brett) - 4 years ago 2019-11-23 14:12:12
brett@sfconservancy.org
website-update: Stop updating the database.

Move this to a separate service.
1 file changed with 3 insertions and 9 deletions:
0 comments (0 inline, 0 general)
cron/scripts/website-update.sh
Show inline comments
...
 
@@ -8,4 +8,2 @@ SITEDIR=~/website
 
PRODUCTION_BRANCH=master
 
DB_FILE=~/Database/conservancy-website.sqlite3
 
DB_SCRIPT=~bkuhn/django-supporters-list.sql
 

	
...
 
@@ -21,7 +19,2 @@ trap 'rmdir "$LOCKDIR"' 0 INT TERM QUIT
 

	
 
exitcode=0
 
if [ "$DB_SCRIPT" -nt "$DB_FILE" ]; then
 
    sqlite3 -bail -cmd ".timeout 30000" "$DB_FILE" <"$DB_SCRIPT" || exitcode=$?
 
fi
 

	
 
# If the checkout is not on the production branch,
...
 
@@ -30,3 +23,3 @@ cd "$SITEDIR"
 
if [ "$(git_rev_name HEAD)" != "$PRODUCTION_BRANCH" ]; then
 
    exit "$exitcode"
 
    exit 0
 
fi
...
 
@@ -43,5 +36,6 @@ git fetch --quiet --no-tags "$git_remote" "$git_refspec"
 
if [ "$(git rev-parse "$PRODUCTION_BRANCH")" = "$(git rev-parse "$git_upstream")" ]; then
 
    exit "$exitcode"
 
    exit 0
 
fi
 

	
 
exitcode=0
 
git merge --quiet --ff-only "$git_remote" "$git_refspec"
0 comments (0 inline, 0 general)