VRFS-190; initial attempt for websocket-gateway
This commit is contained in:
parent
a4882436ed
commit
5de82166b8
|
|
@ -20,3 +20,5 @@ tmp
|
|||
*~
|
||||
*.swp
|
||||
*.iml
|
||||
target
|
||||
vendor
|
||||
|
|
|
|||
4
Gemfile
4
Gemfile
|
|
@ -45,3 +45,7 @@ group :test do
|
|||
gem 'pg_migrate','0.1.6' #:path => "#{workspace}/pg_migrate_ruby"
|
||||
gem 'evented-spec'
|
||||
end
|
||||
|
||||
group :package do
|
||||
gem 'fpm'
|
||||
end
|
||||
|
|
|
|||
48
build
48
build
|
|
@ -1,16 +1,46 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "updating dependencies"
|
||||
bundle update
|
||||
echo "running rspec tests"
|
||||
bundle exec rspec
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [ "$?" = "0" ]; then
|
||||
echo "tests completed"
|
||||
else
|
||||
echo "tests failed."
|
||||
exit 1
|
||||
# 'target' is the output directory
|
||||
rm -rf $DIR/target
|
||||
mkdir $DIR/target
|
||||
mkdir $DIR/target/deb
|
||||
|
||||
# put all dependencies into vendor/bundle
|
||||
#rm -rf vendor/bundle
|
||||
echo "updating dependencies"
|
||||
|
||||
bundle install --path vendor/bundle
|
||||
bundle update
|
||||
|
||||
|
||||
if [ -z $SKIP_TESTS ]; then
|
||||
echo "running rspec tests"
|
||||
bundle exec rspec
|
||||
|
||||
if [ "$?" = "0" ]; then
|
||||
echo "tests completed"
|
||||
else
|
||||
echo "tests failed."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$PACKAGE" ]; then
|
||||
if [ -z "$BUILD_NUMBER" ]; then
|
||||
echo "BUILD NUMBER is not defined"
|
||||
exit 1
|
||||
fi
|
||||
set -e
|
||||
# cache all gems local, and tell bundle to use local gems only
|
||||
bundle install --path vendor/bundle --local
|
||||
|
||||
# create debian using fpm
|
||||
bundle exec fpm -s dir -t deb -p target/deb/websocket-gateway_0.1.${BUILD_NUMBER}_amd64.deb -n "websocket-gateway" -v "0.1.$BUILD_NUMBER" --prefix /var/lib/websocket-gateway --after-install $DIR/script/package/post-install.sh --before-install $DIR/script/package/pre-install.sh --before-remove $DIR/script/package/pre-uninstall.sh --after-remove $DIR/script/package/post-uninstall.sh --exclude $DIR/.git .
|
||||
|
||||
fi
|
||||
|
||||
|
||||
echo "build complete"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue