Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
add Jetty version logic back in
Browse files Browse the repository at this point in the history
  • Loading branch information
jsimone committed Jun 6, 2013
1 parent 5c82cf7 commit d6eaebd
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions bin/compile
Expand Up @@ -143,12 +143,27 @@ if [ ! -d server ] ; then

mkdir server

if [[ "jetty" == "$(get_app_system_value ${baseDir}/system.properties grails.application.container)" || -f $CACHE_DIR/jettyVersion ]] ; then
JETTY_RUNNER_VERSION=$(cat $CACHE_DIR/jettyVersion | sed "s/vendored://g")
if [ "jetty" == "$(get_app_system_value ${BUILD_DIR}/system.properties grails.application.container)" ] ; then
SERVLET_VERSION=$(get_property $BUILD_DIR/grails-app/conf/BuildConfig.groovy 'grails.servlet.version')

if [ "$SERVLET_VERSION" == '3.0' ]; then
JETTY_RUNNER_VERSION=8.1.10.v20130312
else
JETTY_RUNNER_VERSION=7.5.4.v20111024
fi

echo "vendored:${JETTY_RUNNER_VERSION}" > ${CACHE_DIR}/jettyVersion
fi

if [ -f $CACHE_DIR/jettyVersion ] ; then
JETTY_RUNNER_VERSION=$(cat $CACHE_DIR/jettyVersion | sed "s/vendored://g")
echo "-----> No server directory found. Adding jetty-runner $JETTY_RUNNER_VERSION automatically."
DEFAULT_RUNNER_JAR=server/jetty-runner.jar
echo "before curl"
curl -fs http://s3pository.heroku.com/maven-central/org/mortbay/jetty/jetty-runner/$JETTY_RUNNER_VERSION/jetty-runner-$JETTY_RUNNER_VERSION.jar > $DEFAULT_RUNNER_JAR
echo "after curl"
echo "vendored:$JETTY_RUNNER_VERSION" > server/jettyVersion
echo "after echo"
else
WEBAPP_RUNNER_VERSION=7.0.34.3
echo "-----> No server directory found. Adding webapp-runner $WEBAPP_RUNNER_VERSION automatically."
Expand Down

0 comments on commit d6eaebd

Please sign in to comment.