From: Bill Erickson Date: Mon, 21 Jul 2014 13:39:41 +0000 (-0400) Subject: LP#1334693 make_release optional -j X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ff25ed5095f9c7ba2f3df7e6f20ec78e45110bb3;p=evergreen%2Fpines.git LP#1334693 make_release optional -j make_release supports a "-j" option for passing in the OpenSRF JS path: make_release [options] -j /openils/lib/javascript This is useful when running make_release, specifically the staff client building portion, on a machine where the OpenSRF libs are available (say, from a git checkout) but osrf_config is not available because OpenSRF is not actually installed. The script will attempt to find osrf_config and the JS path automatically, so under normal circumstances, -j is not required. Signed-off-by: Bill Erickson Signed-off-by: Ben Shum --- diff --git a/build/tools/make_release b/build/tools/make_release index c52565dcb1..65cef4b9d2 100755 --- a/build/tools/make_release +++ b/build/tools/make_release @@ -18,7 +18,11 @@ BUILD_ONLY=NO # -b UPGRADE_PREVIEW=NO # -r SKIP_I18N=NO # -i -while getopts ":hv:f:F:nptbri" opt; do +# path to OpenSRF libraries +[ "$(which osrf_config)" ] && OSRF_JS_PATH="$(osrf_config --libdir)/javascript"; + + +while getopts ":hv:f:F:nptbrij:" opt; do case $opt in v) VERSION=$OPTARG @@ -47,6 +51,10 @@ while getopts ":hv:f:F:nptbri" opt; do b) BUILD_ONLY=YES ;; + + j) + OSRF_JS_PATH="$OPTARG" + ;; \?) echo "Invalid Option: -$OPTARG" exit 1 @@ -66,12 +74,18 @@ while getopts ":hv:f:F:nptbri" opt; do echo " -b turns on build only mode." echo " -r prompt to preview upgrade SQL in editor before committing." echo " -i skip i18n; primarily useful for (quickly) testing this script." + echo " -j opensrf javascript library path. If osrf_config is found, the value derived from osrf_config --libdir." echo " NOTE: -t and -b override PREV_BRANCH/PREV_VERSION, but -b overrides -t." exit -1 ;; esac done +if [ -z "$OSRF_JS_PATH" ]; then + echo "Unable to find OpenSRF JavaScript library path. Specify with -j"; + exit 1; +fi; + if [ $TAG_ONLY = "YES" ]; then PREV_BRANCH="TAG" fi @@ -326,7 +340,7 @@ wget http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$XULRUNNER_VERSIO wget http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$XULRUNNER_VERSION/runtimes/xulrunner-$XULRUNNER_VERSION.en-US.linux-x86_64.tar.bz2 make rigrelease -make STAFF_CLIENT_STAMP_ID=rel_$UNDER_VERSION build +make STAFF_CLIENT_STAMP_ID=rel_$UNDER_VERSION OPENSRF_JSLIBS="$OSRF_JS_PATH" build make win-client mv evergreen_staff_client_setup.exe ../../../../evergreen-setup-$VERSION.exe make linux32-client