<commit_before>#!/bin/zsh

echo 'This will -> stop all running voice daemons, -> CLEAR'
echo 'all uncommited changes, -> pull the GH repos, -> bundle'
echo 'their gems and finally -> restart the ruby-processes.'

read -q "response?Are you sure? [y/N] "
if [[ $response =~ ^(Y|y)$ ]]; then
  echo
  source <%= node[:rvm][:basedir] %>/scripts/rvm
  sudo sv down /etc/service/*
  ls -1d /opt/voice-* | while read name; do cd $name; git reset --hard; git pull; bundle install --no-binstubs; done
  sudo sv up /etc/service/*
fi<commit_msg>migrate the DB with voice-update<commit_after>#!/bin/zsh

echo 'This will -> stop all running voice daemons, -> CLEAR'
echo 'all uncommited changes, -> pull the GH repos, -> bundle'
echo 'their gems, -> migrate the DB and finally -> restart sv.'

read -q "response?Are you sure? [y/N] "
if [[ $response =~ ^(Y|y)$ ]]; then
  echo
  source <%= node[:rvm][:basedir] %>/scripts/rvm
  sudo sv down /etc/service/*
  ls -1d /opt/voice-* | while read name; do cd $name; git reset --hard; git pull; bundle install --no-binstubs >/dev/null; done
  cd <%= node[:voice_rails][:basedir] %>
  rake db:migrate
  sudo sv up /etc/service/*
fi
{'fraction_non_alphanumeric': 0.16551724137931034, 'fraction_numerical': 0.0017241379310344827, 'mean_word_length': 3.5, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 18, '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': '2976163', 'n_tokens_mistral': 435, 'n_tokens_neox': 403, 'n_words': 146}