<commit_before>#!/bin/bash

set -e # Exit with nonzero exit code if anything fails

SOURCE_BRANCH="develop"
TARGET_BRANCH="master"

# Pull requests and commits to other branches shouldn't try to deploy
if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]; then
  exit 1
fi

# Save some useful information
REPO="https://github.com/LebedevRI/www.rawspeed.org.git"
SSH_REPO="<EMAIL>:LebedevRI/www.rawspeed.org.git"

# Now let's go have some fun with the cloned repo
cd "$TRAVIS_BUILD_DIR/build/docs/doxygen/html"
git config user.name "<NAME>"
git config user.email "<EMAIL>"

date > .timestamp

# If there are no changes (e.g. this is a README update) then just bail.
if [ -z `git diff --exit-code` ]; then
    echo "No changes to the spec on this push; exiting."
    exit 0
fi

# Commit the "changes", i.e. the new version.
# The delta will show diffs between new and old versions.
git add .
git commit -m "Deploy to GitHub Pages: ${TRAVIS_COMMIT}"

ENCRYPTION_LABEL="459909475b8a"

# Get the deploy key by using Travis's stored variables to decrypt wro_deploy.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 wro_deploy.enc -out wro_deploy -d
chmod 600 wro_deploy
eval `ssh-agent -s`
ssh-add wro_deploy

# Now that we're all set up, we can push.
git push $SSH_REPO $TARGET_BRANCH
<commit_msg>www-finish.sh: proper filepaths to enc key<commit_after>#!/bin/bash

set -e # Exit with nonzero exit code if anything fails

SOURCE_BRANCH="develop"
TARGET_BRANCH="master"

# Pull requests and commits to other branches shouldn't try to deploy
if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]; then
  exit 1
fi

# Save some useful information
REPO="https://github.com/LebedevRI/www.rawspeed.org.git"
SSH_REPO="<EMAIL>:LebedevRI/www.rawspeed.org.git"

# Now let's go have some fun with the cloned repo
cd "$TRAVIS_BUILD_DIR/build/docs/doxygen/html"
git config user.name "<NAME>"
git config user.email "<EMAIL>"

date > .timestamp

# If there are no changes (e.g. this is a README update) then just bail.
if [ -z `git diff --exit-code` ]; then
    echo "No changes to the spec on this push; exiting."
    exit 0
fi

# Commit the "changes", i.e. the new version.
# The delta will show diffs between new and old versions.
git add .
git commit -m "Deploy to GitHub Pages: ${TRAVIS_COMMIT}"

ENCRYPTION_LABEL="459909475b8a"

# Get the deploy key by using Travis's stored variables to decrypt wro_deploy.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 "$TRAVIS_BUILD_DIR/.ci/wro_deploy.enc" -out "$TRAVIS_BUILD_DIR/.ci/wro_deploy" -d
chmod 600 "$TRAVIS_BUILD_DIR/.ci/wro_deploy"
eval `ssh-agent -s`
ssh-add "$TRAVIS_BUILD_DIR/.ci/wro_deploy"

# Now that we're all set up, we can push.
git push $SSH_REPO $TARGET_BRANCH

{'fraction_non_alphanumeric': 0.11351351351351352, 'fraction_numerical': 0.011446740858505564, 'mean_word_length': 4.847583643122676, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 5, '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': '1499117', 'n_tokens_mistral': 1264, 'n_tokens_neox': 1155, 'n_words': 347}