Create some scripts to build the executable jars out of bin/*
This commit is contained in:
parent
997ac81e7f
commit
cd71d0edec
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
function load_rvm() {
|
||||
source ~/.rvm/scripts/rvm
|
||||
}
|
||||
|
||||
function use_jruby() {
|
||||
export JRUBY=${JRUBY:=jruby}
|
||||
export GEMSET=${GEMSET:=rubygems}
|
||||
|
||||
echo ">> Using ${JRUBY} in ${GEMSET}"
|
||||
|
||||
rvm use ${JRUBY}@${GEMSET}
|
||||
}
|
||||
|
||||
function install_gems() {
|
||||
# Test to make sure we have bundler around
|
||||
gem which bundler > /dev/null
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo ">> Installing bundler into the ${GEMSET} gemset"
|
||||
gem install bundler --no-ri --no-rdoc
|
||||
fi;
|
||||
|
||||
echo ">> Executing \`bundle install\`"
|
||||
bundle install
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source $(dirname $0)/_usejruby.sh
|
||||
|
||||
|
||||
echo "> Cleaning build/ of jars"
|
||||
|
||||
rm -f build/*.jar
|
||||
|
||||
load_rvm
|
||||
use_jruby
|
||||
install_gems
|
||||
|
||||
for f in bin/*; do
|
||||
export JAR_NAME=$(basename $f)
|
||||
echo "> Building ${JAR_NAME}.jar";
|
||||
warble executable jar
|
||||
mv "${JAR_NAME}.jar" build/
|
||||
done;
|
|
@ -1,23 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source ~/.rvm/scripts/rvm
|
||||
source $(dirname $0)/_usejruby.sh
|
||||
|
||||
JRUBY=${JRUBY:=jruby}
|
||||
GEMSET=${GEMSET:=rubygems}
|
||||
|
||||
echo ">> Using ${JRUBY} in ${GEMSET}"
|
||||
|
||||
rvm use ${JRUBY}@${GEMSET}
|
||||
|
||||
# Test to make sure we have bundler around
|
||||
which bundle > /dev/null
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo ">> Installing bundler into the ${GEMSET} gemset"
|
||||
gem install bundler --no-ri --no-rdoc
|
||||
fi;
|
||||
|
||||
echo ">> Executing \`bundle install\`"
|
||||
bundle install
|
||||
load_rvm
|
||||
use_jruby
|
||||
install_gems
|
||||
|
||||
exec $@
|
||||
|
|
Loading…
Reference in New Issue