Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Add logging to all dag-sync exits (#4051)
sarayourfriendd57b1d452697
diff --git a/dag-sync.sh b/dag-sync.shindex 240034193..7be861315 100755--- a/dag-sync.sh+++ b/dag-sync.sh@@ -19,14 +19,20 @@ git fetch origin# Get new commit hash *one commit ahead* of this onenew=$(git rev-list --reverse --topo-order HEAD..origin/main | head -1)# If there is no new commit hash to move to, nothing has changed, quit early-[ -z "$new" ] && exit+if [ -z "$new" ]; then+ echo "No new commits, nothing has changed, nothing to do."+ exit+fi# Move ahead to this new commitgit reset --hard "$new"# Verify if have /dags/ in the last commithave_dag=$(git log -p -1 "$new" --pretty=format: --name-only | grep "catalog/dags/")# If there is no files under /dags/ folder, no need to notify, quit early-[ -z "$have_dag" ] && exit+if [ -z "$have_dag" ]; then+ echo "No changes to DAGs, nothing to do."+ exit+fi# Pull out the subject from the new commitsubject=$(git log -1 --format='%s')