<commit_before>env=$1

# Set env variables
if [ $env = "staging" ]
then
  branch_name="staging"
  remote="https://git.heroku.com/opencollective-staging-public.git"
elif [ $env = "production" ]
then
  branch_name="production"
  remote="https://git.heroku.com/opencollective-prod-public.git"
else
  echo "Unknown env: $env, only staging and production are valid"
  exit
fi

# Create branch for first time user or checkout existing one
if [[ `git branch --list $branch_name ` ]]
then
  git checkout $branch_name
else
  git checkout -b $branch_name master
fi

# Get latest changes on github
git fetch origin

# Merge github master branch
git merge origin/master

# Update on github
git push origin $branch_name

# Push to heroku
git push $remote $branch_name:master<commit_msg>rename deploy script remote<commit_after>env=$1

# Set env variables
if [ $env = "staging" ]
then
  branch_name="staging"
  remote="https://git.heroku.com/opencollective-staging-website.git"
elif [ $env = "production" ]
then
  branch_name="production"
  remote="https://git.heroku.com/opencollective-prod-website.git"
else
  echo "Unknown env: $env, only staging and production are valid"
  exit
fi

# Create branch for first time user or checkout existing one
if [[ `git branch --list $branch_name ` ]]
then
  git checkout $branch_name
else
  git checkout -b $branch_name master
fi

# Get latest changes on github
git fetch origin

# Merge github master branch
git merge origin/master

# Update on github
git push origin $branch_name

# Push to heroku
git push $remote $branch_name:master
{'fraction_non_alphanumeric': 0.09603072983354674, 'fraction_numerical': 0.0012804097311139564, 'mean_word_length': 4.503521126760563, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '2177663', 'n_tokens_mistral': 512, 'n_tokens_neox': 486, 'n_words': 170}