#!/bin/bash

source scripts/env

if [ "$(git diff)" ]; then
  echo "You need to make all the commits before you release" >&2
  exit 1
fi

git rm -r "$DIST"

scripts/dist
scripts/bower-config > bower.json
scripts/component-config > component.json

git add .
git commit -m "Build: $npm_package_version"
git tag -f "$npm_package_version"

git push origin master
git push origin --tags
npm publish
