#!/bin/bash

set -e

git config --global user.email "michael.drogalis@onyxplatform.org"
git config --global user.name "OnyxBot"
git clone $1 && \
    cd $2 && \
    git checkout master && \
    lein voom freshen && \
    git commit -am "CircleCI automatic commit: Freshening dependencies to latest." && \
    git push origin master && \
    cd ..

#!/bin/bash

set -e

git config --global user.email "michael.drogalis@onyxplatform.org"
git config --global user.name "OnyxBot"
git clone $1 && cd $2 && git checkout master && lein voom freshen

rc = $?

if [[ ?rc != 0 ]]; then
  cd $2
  git commit -am "CircleCI automatic commit: Freshening dependencies to latest." && git push origin master
fi

Check if anything is staged.
Check if anything is staged.
