Sha256: 725d68c9b0f6340c26de833eee318c4076dec77e8176dc8908585b4786d85660

Contents?: true

Size: 747 Bytes

Versions: 4

Compression:

Stored size: 747 Bytes

Contents

SCHEMA="pact_broker"
set -e
mysql mysql -h localhost -u root -e "select 'drop table "' || tablename || '" cascade;' from pg_tables;'"
mysql mysql -h localhost -u root -e 'CREATE DATABASE pact_broker;'
mysql mysql -h localhost -u root -e "GRANT ALL ON pact_broker.* TO 'pact_broker'@'%' identified by 'pact_broker';"

ip=$(ifconfig en0 | sed -n -e '/inet/s/.*inet \([0-9.]*\) netmask .*/\1/p')
echo ""
echo "run the following command to set your environment variables:"
echo "export PACT_BROKER_DATABASE_USERNAME=pact_broker"
echo "export PACT_BROKER_DATABASE_PASSWORD=pact_broker"
echo "export PACT_BROKER_DATABASE_NAME=${SCHEMA}"
echo "export PACT_BROKER_DATABASE_HOST=${ip}"
echo "To test:"
echo "mysql -upact_broker -ppact_broker -hlocalhost"

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pact_broker-2.16.1 script/recreate-mysql-db.sh
pact_broker-2.16.0 script/recreate-mysql-db.sh
pact_broker-2.15.0 script/recreate-mysql-db.sh
pact_broker-2.14.0 script/recreate-mysql-db.sh