#!/usr/bin/env bash
npm run compile
changes=$(git status dist --porcelain | wc -l)
if [ "$changes" -gt 0 ]
then
    echo "dist/ bundle is not up to date."
	git config --global user.email $GIT_EMAIL
	git config --global user.name $GIT_NAME
	git config --global push.default current
	git add dist/
	git commit -m 'chore(bundle): compiled bundle'
	git push -u --no-verify
	exit 1
fi
