jam-cloud/build

33 lines
711 B
Plaintext
Raw Normal View History

#!/bin/bash -l
TARGET=target
PG_BUILD_OUT=$TARGET/build
PG_RUBY_PACKAGE_OUT=$TARGET/ruby_package
PROJECT_NAME="jam_db"
if [ -z $BUILD_NUMBER ]; then
2012-11-01 22:25:03 +00:00
BUILD_NUMBER="0.0.${BUILD_NUMBER}"
fi
set -e
# remove the output directory
rm -rf $TARGET
mkdir -p $PG_BUILD_OUT
mkdir -p $PG_RUBY_PACKAGE_OUT
bundle update
echo "building migrations"
bundle exec pg_migrate build --source . --out $PG_BUILD_OUT --test --verbose
2012-11-01 22:25:03 +00:00
echo "packaging migrations for ruby"bundle exec pg_migrate package --source $PG_BUILD_OUT --out $PG_RUBY_PACKAGE_OUT --name jam-db --version "$BUILD_NUMBER"
bundle exec pg_migrate package --source $PG_BUILD_OUT --out $PG_RUBY_PACKAGE_OUT --name $PROJECT_NAME --version $BUILD_NUMBER