<commit_before>#!/bin/bash -ve

DEST_BRANCH=gh-pages

# prepare the gh-pages branch
git checkout -B $DEST_BRANCH --no-track

rm -rf bin/ config/ flow-typed/ modules/ playground/ screenshots/ scripts/
find ./ -maxdepth 1 -type f -not -name '.git*' -not -name package.json -delete
mv build/* ./
rm -f build/.DS_Store
rmdir build/

# Get the deploy key by using Travis's stored variables to decrypt config/deploy_key.enc
ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"
ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR}
ENCRYPTED_IV=${!ENCRYPTED_IV_VAR}
openssl aes-256-cbc -K "$ENCRYPTED_KEY" -iv "$ENCRYPTED_IV" -in config/deploy_key.enc -out deploy_key -d
chmod 600 deploy_key
eval "${ssh-agent -s}"
ssh-add deploy_key

# and … push
git add --all ./
git commit -m "build app" --quiet
git push -f "https://github.com/hawkrives/gobbldygook.git" $DEST_BRANCH
curl -d "apiKey=7e393deddaeb885f5b140b4320ecef6b" -d "repository=https://github.com/hawkrives/gobbldygook" -d "revision=$(git rev-parse --verify HEAD)" 'https://notify.bugsnag.com/deploy'<commit_msg>edit travis deploy<commit_after>#!/bin/bash -ve

DEST_BRANCH=gh-pages

# prepare the gh-pages branch
git checkout -B $DEST_BRANCH --no-track

# Get the deploy key by using Travis's stored variables to decrypt config/deploy_key.enc
ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"
ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR}
ENCRYPTED_IV=${!ENCRYPTED_IV_VAR}
openssl aes-256-cbc -K "$ENCRYPTED_KEY" -iv "$ENCRYPTED_IV" -in config/deploy_key.enc -out deploy_key -d
chmod 600 deploy_key
eval "${ssh-agent -s}"
ssh-add deploy_key

# Remove unneeded files
rm -rf bin/ config/ flow-typed/ modules/ playground/ screenshots/ scripts/
find ./ -maxdepth 1 -type f -not -name '.git*' -not -name package.json -not -name deploy_key -delete
mv build/* ./
rm -f build/.DS_Store
rmdir build/

# and … push
git add --all ./
git commit -m "build app" --quiet
git push -f "https://github.com/hawkrives/gobbldygook.git" $DEST_BRANCH
curl -d "apiKey=7e393deddaeb885f5b140b4320ecef6b" -d "repository=https://github.com/hawkrives/gobbldygook" -d "revision=$(git rev-parse --verify HEAD)" 'https://notify.bugsnag.com/deploy'
{'fraction_non_alphanumeric': 0.13573653760569648, 'fraction_numerical': 0.020471740097908322, 'mean_word_length': 4.648241206030151, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, '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': '4379235', 'n_tokens_mistral': 952, 'n_tokens_neox': 846, 'n_words': 213}