mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Merge pull request #7578 from psychoslave/master
Update things related to some package manager influencing setup process
This commit is contained in:
@@ -1 +1 @@
|
||||
5.12.0
|
||||
14.16.1
|
||||
|
||||
15
script/setup
15
script/setup
@@ -18,7 +18,6 @@ RED='\033[0;31m'
|
||||
NO_COLOR='\033[0m'
|
||||
|
||||
RUBY_VERSION=$(cat .ruby-version)
|
||||
NODE_VERSION=$(cat .node-version)
|
||||
|
||||
# Check ruby version
|
||||
if ! ruby --version | grep $RUBY_VERSION > /dev/null; then
|
||||
@@ -26,12 +25,6 @@ if ! ruby --version | grep $RUBY_VERSION > /dev/null; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check node version
|
||||
if ! node --version | grep $NODE_VERSION > /dev/null; then
|
||||
printf "${RED}Open Food Network requires node ${NODE_VERSION}${NO_COLOR}. Have a look at: https://github.com/nodenv/nodenv\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set up Ruby dependencies via Bundler
|
||||
if ! command -v bundle > /dev/null; then
|
||||
./script/install-bundler
|
||||
@@ -39,7 +32,7 @@ fi
|
||||
|
||||
# Install all dependencies
|
||||
bundle check || bundle install
|
||||
npm install
|
||||
yarn install
|
||||
|
||||
# Set up configurable environment variables
|
||||
if [ ! -f config/application.yml ]; then
|
||||
@@ -47,12 +40,6 @@ if [ ! -f config/application.yml ]; then
|
||||
printf "${YELLOW}Copied config/application.yml Make sure to fill it with the appropriate configuration values.\n\n${NO_COLOR}"
|
||||
fi
|
||||
|
||||
# Set up newrelic.yml for development environment, used by the newrelic_rpm gem
|
||||
if [ ! -f config/newrelic.yml ]; then
|
||||
cp config/newrelic.yml.example config/newrelic.yml
|
||||
printf "${YELLOW}Copied config/newrelic.yml which configures the development environment for the newrelic_rpm gem.\n\n${NO_COLOR}"
|
||||
fi
|
||||
|
||||
# Set up the database for both development and test
|
||||
# Confirming the default user and password
|
||||
printf '\n\n' | bundle exec rake db:setup db:test:prepare
|
||||
|
||||
Reference in New Issue
Block a user