-
Notifications
You must be signed in to change notification settings - Fork 864
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #660 from mislav/update-bootstrap
bootstrap: update for docker compose
- Loading branch information
Showing
2 changed files
with
7 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
PATH_add ./bin | ||
|
||
# shellcheck shell=bash | ||
export MYSQL_HOST=127.0.0.1 | ||
export MYSQL_PORT=3307 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,21 +2,11 @@ | |
# vi:ft=sh: | ||
set -e | ||
|
||
if type -p brew >/dev/null; then | ||
brew bundle --no-upgrade | ||
mysql_prefix="$(brew --prefix [email protected])" | ||
openssl_prefix="$(brew --prefix [email protected])" | ||
bundle config set --local build.mysql2 --with-mysql-config="${mysql_prefix}/bin/mysql_config" --with-ldflags="-L${openssl_prefix}/lib" | ||
brew install libpq | ||
brew install --skip-post-install [email protected] | ||
|
||
while [ ! -e /tmp/mysql.sock ] && [ ! -e /var/run/mysql5/mysqld.sock ]; do | ||
echo "Waiting for mysql to start up ..." >&2 | ||
sleep 1 | ||
done | ||
fi | ||
|
||
mysql -u root -e 'CREATE DATABASE IF NOT EXISTS will_paginate;' | ||
psql --dbname will_paginate -c '' 2>/dev/null || createdb will_paginate | ||
|
||
bundle config set path "$PWD/vendor/bundle" | ||
bundle config --local build.mysql2 -- "$(ruby -r rbconfig -e 'puts RbConfig::CONFIG["configure_args"]' | xargs -n1 | grep with-openssl-dir)" | ||
bundle config --local build.pg -- --with-pg-config=$(brew --prefix libpq)/bin/pg_config | ||
bundle config --local path "$PWD/vendor/bundle" | ||
bundle install | ||
bundle binstubs rspec-core |