only publish babel-cli when the directory has had changes since the last version - fixes #1848

This commit is contained in:
Sebastian McKenzie
2015-06-26 16:21:37 +01:00
parent 9c8cb33a09
commit d4edce6559
2 changed files with 13 additions and 4 deletions

12
tools/publish-cli.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
LAST_TAG=$(git describe $(git rev-list --tags --max-count=1))
TAG_DIFF=$(git diff $LAST_TAG -- packages/babel-cli/)
if [ -n "$TAG_DIFF" ]; then
cd ../packages
node build-cli.js
cd babel-cli
npm publish
fi