2016-11-08 16:59:30 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -eo pipefail
|
|
|
|
|
|
|
|
[ "$(uname -s)" != "Darwin" ] && exit
|
|
|
|
|
|
|
|
. dependencies.list
|
|
|
|
|
2017-06-26 09:42:55 +00:00
|
|
|
if [ -f object-server-for-testing/node_modules/realm-object-server-developer/package.json ]; then
|
|
|
|
if grep -q "\"version\": \"$REALM_OBJECT_SERVER_VERSION\"" object-server-for-testing/node_modules/realm-object-server-developer/package.json; then
|
2016-11-08 16:59:30 +00:00
|
|
|
echo -e "yes\n" | object-server-for-testing/reset-server-realms.command
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2016-12-06 11:43:25 +00:00
|
|
|
object_server_bundle="realm-object-server-bundled_node_darwin-developer-$REALM_OBJECT_SERVER_VERSION.tar.gz"
|
2016-11-08 16:59:30 +00:00
|
|
|
curl -f -L "https://static.realm.io/downloads/object-server/$object_server_bundle" -o "$object_server_bundle"
|
|
|
|
rm -rf object-server-for-testing
|
|
|
|
mkdir object-server-for-testing
|
|
|
|
tar -C object-server-for-testing -xf "$object_server_bundle"
|
|
|
|
rm "$object_server_bundle"
|
|
|
|
|
2017-08-11 08:30:57 +00:00
|
|
|
echo "enterprise:\n skip_setup: true\n" >> "object-server-for-testing/object-server/configuration.yml"
|
|
|
|
# Change to a "warn" level
|
|
|
|
sed -i -- "s/# level: 'info'/level: 'warn'/g" object-server-for-testing/object-server/configuration.yml
|
|
|
|
touch "object-server-for-testing/object-server/do_not_open_browser"
|