mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-12 16:45:49 +00:00
44 lines
668 B
Plaintext
44 lines
668 B
Plaintext
echo "PUBLISH"
|
|
|
|
function exit_on_error {
|
|
res=$?
|
|
[[ ${res:-99} -eq 0 ]] || exit $res
|
|
}
|
|
|
|
rm -rf build
|
|
|
|
npm install
|
|
gulp
|
|
npm test
|
|
exit_on_error
|
|
|
|
echo ""
|
|
echo "publish to npm"
|
|
npm publish
|
|
exit_on_error
|
|
|
|
rm -rf dist/bower
|
|
echo ""
|
|
echo "publish to bower"
|
|
|
|
git clone git@github.com:ripple/bower-ripple.git dist/bower
|
|
gulp bower
|
|
exit_on_error
|
|
|
|
cd dist/bower
|
|
version=$(cat bower.json | grep -Eo '([0-9]\.?)+(-rc([0-9])+)?')
|
|
echo "version: $version"
|
|
git add ripple.js ripple-debug.js ripple-min.js bower.json
|
|
exit_on_error
|
|
|
|
git commit -m "[TASK] add v$version"
|
|
exit_on_error
|
|
|
|
git tag "v$version"
|
|
exit_on_error
|
|
|
|
git push origin master
|
|
git push --tags origin master
|
|
|
|
cd ../..
|