t
This commit is contained in:
@@ -12,5 +12,5 @@ if [ ! -d ./_babel ]; then
|
||||
fi
|
||||
|
||||
make build
|
||||
git commit -am "${TRAVIS_TAG}"
|
||||
git push "https://${GH_TOKEN}@github.com/babel/babel.github.io"
|
||||
git commit -am "v`babel -V`"
|
||||
git push
|
||||
3
scripts/publish.js
Normal file
3
scripts/publish.js
Normal file
@@ -0,0 +1,3 @@
|
||||
var fs = require("fs");
|
||||
|
||||
var packageNames = fs.readDirSync(__filename + "/../packages");
|
||||
@@ -1,15 +1,16 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
TEST_DIRS=""
|
||||
|
||||
for f in packages/*; do
|
||||
if [ -n "$TEST_ONLY" ] && [ `basename $f` != "$TEST_ONLY" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ -d "$f/test" ]; then
|
||||
echo $f
|
||||
cd $f
|
||||
node ../../node_modules/mocha/bin/_mocha
|
||||
cd ../../
|
||||
TEST_DIRS="$f/test $TEST_DIRS"
|
||||
fi
|
||||
done
|
||||
|
||||
node node_modules/mocha/bin/_mocha $TEST_DIRS --reporter dot --ui tdd
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
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
|
||||
echo "Changes detected to babel-cli since last tag, publishing new version."
|
||||
|
||||
cd ../packages
|
||||
node build-cli.js
|
||||
|
||||
cd babel-cli
|
||||
npm publish
|
||||
else
|
||||
echo "No changes detected to babel-cli since last tag"
|
||||
fi
|
||||
Reference in New Issue
Block a user