2016-12-11 10:13:34 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# variables
|
2016-12-11 10:30:30 +01:00
|
|
|
PACKAGES=( "parity" "etherscan" "shapeshift" )
|
2016-12-11 10:13:34 +01:00
|
|
|
|
|
|
|
# change into the build directory
|
|
|
|
BASEDIR=`dirname $0`
|
|
|
|
cd $BASEDIR/..
|
|
|
|
|
|
|
|
# build all packages
|
|
|
|
echo "*** Building packages for npmjs"
|
|
|
|
echo "$NPM_TOKEN" >> ~/.npmrc
|
|
|
|
|
|
|
|
for PACKAGE in ${PACKAGES[@]}
|
|
|
|
do
|
|
|
|
echo "*** Building $PACKAGE"
|
|
|
|
LIBRARY=$PACKAGE npm run ci:build:npm
|
2016-12-11 10:30:30 +01:00
|
|
|
DIRECTORY=.npmjs/$PACKAGE
|
2016-12-11 10:13:34 +01:00
|
|
|
|
|
|
|
cd $DIRECTORY
|
|
|
|
echo "*** Executing $PACKAGE tests from $DIRECTORY"
|
|
|
|
npm test
|
|
|
|
|
|
|
|
echo "*** Publishing $PACKAGE from $DIRECTORY"
|
|
|
|
echo "npm publish --access public || true"
|
|
|
|
cd ../..
|
|
|
|
|
|
|
|
done
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
# exit with exit code
|
|
|
|
exit 0
|