<commit_before>#!/bin/bash

if [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ]; then
  docker tag neinteractiveliterature/intercode:$TRAVIS_COMMIT neinteractiveliterature/intercode:$TRAVIS_PULL_REQUEST_BRANCH
  docker push neinteractiveliterature/intercode:$TRAVIS_PULL_REQUEST_BRANCH
else
  docker tag neinteractiveliterature/intercode:$TRAVIS_COMMIT neinteractiveliterature/intercode:latest
  docker push neinteractiveliterature/intercode:latest


  echo "$HEROKU_API_KEY" | docker login --username=_ --password-stdin registry.heroku.com
  docker tag neinteractiveliterature/intercode:$TRAVIS_COMMIT registry.heroku.com/intercode/web
  docker build -t registry.heroku.com/intercode/release --build-arg INTERCODE_TAG=$TRAVIS_COMMIT -f Dockerfile.release .
  docker build -t registry.heroku.com/intercode/shoryuken --build-arg INTERCODE_TAG=$TRAVIS_COMMIT -f Dockerfile.shoryuken .

  docker push registry.heroku.com/intercode/web
  docker push registry.heroku.com/intercode/release
  docker push registry.heroku.com/intercode/shoryuken

  # DOCKER_IMAGE_ID=$(docker inspect registry.heroku.com/intercode/$TRAVIS_COMMIT --format='{{.Id}}')
  #
  # echo "machine api.heroku.com\n  login $HEROKU_EMAIL\n  password $<PASSWORD>" >> ~/.netrc
  # curl -n -X PATCH https://api.heroku.com/apps/intercode/formation \
  # -d '{
  #   "updates": [
  #     {
  #       "type": "web",
  #       "docker_image": "$DOCKER_IMAGE_ID"
  #     },
  #     {
  #       "type": "shoryuken",
  #       "docker_image": "$DOCKER_IMAGE_ID"
  #     },
  #     {
  #       "type": "release",
  #       "docker_image": "$DOCKER_IMAGE_ID"
  #     }
  #   ]
  # }' \
  # -H "Content-Type: application/json" \
  # -H "Accept: application/vnd.heroku+json; version=3.docker-releases"
fi<commit_msg>Clean up Heroku deploy stuff we're not using (yet)<commit_after>#!/bin/bash

if [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ]; then
  docker tag neinteractiveliterature/intercode:$TRAVIS_COMMIT neinteractiveliterature/intercode:$TRAVIS_PULL_REQUEST_BRANCH
  docker push neinteractiveliterature/intercode:$TRAVIS_PULL_REQUEST_BRANCH
else
  docker tag neinteractiveliterature/intercode:$TRAVIS_COMMIT neinteractiveliterature/intercode:latest
  docker push neinteractiveliterature/intercode:latest


  echo "$HEROKU_API_KEY" | docker login --username=_ --password-stdin registry.heroku.com
  docker tag neinteractiveliterature/intercode:$TRAVIS_COMMIT registry.heroku.com/intercode/web
  docker build -t registry.heroku.com/intercode/release --build-arg INTERCODE_TAG=$TRAVIS_COMMIT -f Dockerfile.release .
  docker build -t registry.heroku.com/intercode/shoryuken --build-arg INTERCODE_TAG=$TRAVIS_COMMIT -f Dockerfile.shoryuken .

  docker push registry.heroku.com/intercode/web
  docker push registry.heroku.com/intercode/release
  docker push registry.heroku.com/intercode/shoryuken
fi
{'fraction_non_alphanumeric': 0.11201413427561838, 'fraction_numerical': 0.00035335689045936394, 'mean_word_length': 4.529296875, 'pattern_counts': {'":': 7, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 1, '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': '4398195', 'n_tokens_mistral': 1050, 'n_tokens_neox': 988, 'n_words': 159}