<commit_before>#!/bin/bash

set -e

DIR=$(dirname "$0")
packageVersion=$( cat ./swagger-config/config-python.json | jq -r ".packageVersion" )
BRANCH_NAME=release/$packageVersion

echo "Going to update Python SDK..."

eval "$(ssh-agent -s)" #start the ssh agent
chmod 600 $DIR/python-repo.pem # this key should have push access
ssh-add $DIR/python-repo.pem

git clone <EMAIL>:square/connect-python-sdk.git
cd connect-python-sdk
if [ `git branch -r | grep "${BRANCH_NAME}"` ]
then
    git checkout $BRANCH_NAME
else
    git checkout -b $BRANCH_NAME
fi

echo "Copying files..."
rm -rf docs lib
cp -r ../swagger-out/python/docs .
cp -r ../swagger-out/python/squareconnect .
cp ../swagger-out/python/.travis.yml .
cp ../swagger-out/python/requirements.txt .
cp ../swagger-out/python/test-requirements.txt .
cp ../swagger-out/python/setup.py .
cp ../swagger-out/python/tox.ini .
cp ../swagger-out/python/README.md .

git add .
git commit -m "Pushed by Travis CI from connect-api-specification. Commit: ${TRAVIS_COMMIT}"

# only push to sdk repo when it's merged into master
if [ "${TRAVIS_PULL_REQUEST_BRANCH}" = "" -a "${TRAVIS_BRANCH}" = "master" ];
then
    git push -u origin $BRANCH_NAME
else
    echo "Skip push because of pull request."
fi
<commit_msg>Python: Do not copy travis.yml<commit_after>#!/bin/bash

set -e

DIR=$(dirname "$0")
packageVersion=$( cat ./swagger-config/config-python.json | jq -r ".packageVersion" )
BRANCH_NAME=release/$packageVersion

echo "Going to update Python SDK..."

eval "$(ssh-agent -s)" #start the ssh agent
chmod 600 $DIR/python-repo.pem # this key should have push access
ssh-add $DIR/python-repo.pem

git clone <EMAIL>:square/connect-python-sdk.git
cd connect-python-sdk
if [ `git branch -r | grep "${BRANCH_NAME}"` ]
then
    git checkout $BRANCH_NAME
else
    git checkout -b $BRANCH_NAME
fi

echo "Copying files..."
rm -rf docs lib
cp -r ../swagger-out/python/docs .
cp -r ../swagger-out/python/squareconnect .
cp ../swagger-out/python/requirements.txt .
cp ../swagger-out/python/test-requirements.txt .
cp ../swagger-out/python/setup.py .
cp ../swagger-out/python/tox.ini .
cp ../swagger-out/python/README.md .

git add .
git commit -m "Pushed by Travis CI from connect-api-specification. Commit: ${TRAVIS_COMMIT}"

# only push to sdk repo when it's merged into master
if [ "${TRAVIS_PULL_REQUEST_BRANCH}" = "" -a "${TRAVIS_BRANCH}" = "master" ];
then
    git push -u origin $BRANCH_NAME
else
    echo "Skip push because of pull request."
fi

{'fraction_non_alphanumeric': 0.14935587761674718, 'fraction_numerical': 0.00322061191626409, 'mean_word_length': 3.4855595667870034, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6174250', 'n_tokens_mistral': 930, 'n_tokens_neox': 874, 'n_words': 252}