From 3467375c7d5e422096435ab50bbb47d299a199a1 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 11 Sep 2014 11:29:47 -0400 Subject: [PATCH] EG browser client build + test Signed-off-by: Bill Erickson --- installer/wheezy/eg_wheezy_installer.sh | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/installer/wheezy/eg_wheezy_installer.sh b/installer/wheezy/eg_wheezy_installer.sh index fe56cb764..364a2d0aa 100755 --- a/installer/wheezy/eg_wheezy_installer.sh +++ b/installer/wheezy/eg_wheezy_installer.sh @@ -42,6 +42,7 @@ function my_init { install_opensrf build_evergreen test_evergreen_build + test_and_build_eg_browser_client install_evergreen configure_database configure_apache @@ -95,6 +96,12 @@ function init_variables { echo OPENSRF_PREREQ_TARGET=${OPENSRF_PREREQ_TARGET} echo EVERGREEN_PREREQ_TARGET=${EVERGREEN_PREREQ_TARGET} echo EVERGREEN_DB_PREREQ_TARGET=${EVERGREEN_DB_PREREQ_TARGET} + + export NODEJS_REPO='https://github.com/joyent/node.git' + export NODEJS_VERSION='v0.10.31' + echo "NODEJS_REPO=$NODEJS_REPO" + echo "NODEJS_VERSION=$NODEJS_VERSION" + echo End of intializing installer =~-._ } @@ -349,9 +356,48 @@ function test_evergreen_build { echo End of Evergreen build tests =~-._ } + +# The evergreen browser client prereq installation and +# build process is not baked into Evergreen proper (yet). +# Run it as a standalone operation for now. +function test_and_build_eg_browser_client { + echo _.-~= Running Evergreen browser client build/test + cd /tmp + git clone $NODEJS_REPO + cd node + git checkout -b $NODEJS_VERSION $NODEJS_VERSION + ./configure && make -j2 && make install + echo Return Value = $? + npm update + echo Return Value = $? + npm install -g grunt-cli # install grunt + echo Return Value = $? + npm install -g bower # install bower + echo Return Value = $? + cd /home/opensrf/Evergreen/Open-ILS/web/js/ui/default/staff + npm install # fetch build depencies + echo Return Value = $? + + # fetch JS/CSS/etc prereqs + if [ $YES ]; then + # yes == allow sending package stats + yes | bower --allow-root install + else + bower --allow-root install + fi + echo Return Value = $? + + grunt build # concatentate, minify, copy into place + echo Return Value = $? + grunt test # run JS unit tests + echo Return Value = $? + echo End of Evergreen browser client build/test =~-._ +} + function install_evergreen { echo _.-~= Installing Evergreen date + cd /home/opensrf/Evergreen make install echo Return Value = $? -- 2.11.0