<commit_before>#!/bin/bash

GIT_STATUS_LINES=$(git status --porcelain | wc -l)
GIT_REMOTE_LOCAL_DIFF=$(git log origin/master..master | wc -l)

if [ $GIT_STATUS_LINES -ge 1 ] && [ $GIT_REMOTE_LOCAL_DIFF -ne 0 ] ; then
	echo "Error: Cannot publish changes. Some changes have not been committed or pushed. See git status to get more details.";
 	git status;
	exit 1;
fi

GIT_CURRENT_REVISION=$(git rev-parse --verify HEAD)
GIT_COMMIT_MESSAGE="Generated page based on revision "$GIT_CURRENT_REVISION

cd ../2016.mobilization.pl-gh-pages
git pull
git add -A
git commit -m "$GIT_COMMIT_MESSAGE"
git push origin gh-pages<commit_msg>Fix publish.sh; wrong rejection condition.<commit_after>#!/bin/bash

GIT_STATUS_LINES=$(git status --porcelain | wc -l)
GIT_REMOTE_LOCAL_DIFF=$(git log origin/master..master | wc -l)

if [ $GIT_STATUS_LINES -ge 1 ] || [ $GIT_REMOTE_LOCAL_DIFF -ne 0 ] ; then
	echo "Error: Cannot publish changes. Some changes have not been committed or pushed. See git status to get more details.";
 	git status;
	exit 1;
fi

GIT_CURRENT_REVISION=$(git rev-parse --verify HEAD)
GIT_COMMIT_MESSAGE="Generated page based on revision "$GIT_CURRENT_REVISION

cd ../2016.mobilization.pl-gh-pages
git pull
git add -A
git commit -m "$GIT_COMMIT_MESSAGE"
git push origin gh-pages
{'fraction_non_alphanumeric': 0.10867865519937452, 'fraction_numerical': 0.0109460516028147, 'mean_word_length': 4.5895196506550215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6108774', 'n_tokens_mistral': 483, 'n_tokens_neox': 445, 'n_words': 143}