<commit_before>#!/bin/bash
set -ex

PROJECTS='hail batch ci site scorecard cloudtools'

SHA=$(git rev-parse --short=12 HEAD)

for project in $PROJECTS; do
    if [[ -e $project/hail-ci-deploy.sh ]]; then
        CHANGED=yes # default
        if [[ -e $project/get-deployed-sha.sh ]]; then
            DEPLOYED_SHA=$(cd $project && /bin/bash get-deployed-sha.sh 2>/dev/null || true)
            if [[ $DEPLOYED_SHA != $SHA ]]; then
                if [[ $(git cat-file -t "$DEPLOYED_SHA" 2>/dev/null || true) == commit ]]; then
                    CHANGED=$(python3 project-changed.py $DEPLOYED_SHA hail)
                fi
            fi
        fi
        
        if [[ $CHANGED != no ]]; then
            (cd $project && /bin/bash hail-ci-deploy.sh)
        fi
    fi
done<commit_msg>Do not redeploy batch and CI constantly (#4449)<commit_after>#!/bin/bash
set -ex

PROJECTS='hail batch ci site scorecard cloudtools'

SHA=$(git rev-parse --short=12 HEAD)

for project in $PROJECTS; do
    if [[ -e $project/hail-ci-deploy.sh ]]; then
        CHANGED=yes # default
        if [[ -e $project/get-deployed-sha.sh ]]; then
            DEPLOYED_SHA=$(cd $project && /bin/bash get-deployed-sha.sh 2>/dev/null || true)
            if [[ $DEPLOYED_SHA != $SHA ]]; then
                if [[ $(git cat-file -t "$DEPLOYED_SHA" 2>/dev/null || true) == commit ]]; then
                    CHANGED=$(python3 project-changed.py $DEPLOYED_SHA hail)
                fi
            else
                CHANGED=no
            fi
        fi
        
        if [[ $CHANGED != no ]]; then
            (cd $project && /bin/bash hail-ci-deploy.sh)
        fi
    fi
done
{'fraction_non_alphanumeric': 0.14285714285714285, 'fraction_numerical': 0.00847457627118644, 'mean_word_length': 1.8016949152542372, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3552739', 'n_tokens_mistral': 589, 'n_tokens_neox': 544, 'n_words': 138}