openethereum/js/scripts/build.sh
Jaco Greeff d1d82e787b Make GitLab js-precompiled really update Cargo.toml in main repo (#2869)
* Src outputs into build.sh

* reset detatched head

* add .dist

* testing for this branch

* update comments, be explicit is what we are doing

* [ci skip] js-precompiled 20161025-173946

* Revert "[ci skip] js-precompiled 20161025-173946"

This reverts commit 0d23f7683c6e18e4642566313963c130684afa90.

* remove testing branch

* typo
2016-10-25 22:27:13 +02:00

24 lines
445 B
Bash
Executable File

#!/bin/bash
# change into the js directory (one down from scripts)
pushd `dirname $0`
cd ..
# run build (production) and store the exit code
EXITCODE=0
BUILDDIR=./.dist
rm -rf $BUILDDIR
mkdir -p $BUILDDIR/src
BUILD_DEST=$BUILDDIR/build npm run ci:build || EXITCODE=1
# Copy rust files
cp Cargo.precompiled.toml $BUILDDIR/Cargo.toml
cp build.rs $BUILDDIR
cp src/lib.rs* $BUILDDIR/src
# back to root
popd
# exit with exit code
exit $EXITCODE