diff --git a/dist/update-dev.sh b/dist/update-dev.sh new file mode 100755 index 0000000000..d0909d3e8b --- /dev/null +++ b/dist/update-dev.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +function installRuby { + rbMasto=`cat .ruby-version` + rbVersions=`rbenv versions` + + # build and install ruby with jemalloc + if [[ *$rbMasto* == $rbVersions ]]; then + RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install $rbMasto + fi +} + +function installMastoDeps { + bundle install -j$(getconf _NPROCESSORS_ONLN) + yarn install + + # setup db + bundle exec rails db:migrate +} + +installRuby +installMastoDeps + +# Done! +echo "Setup done! Run 'foreman start' to start sidekiq, streaming, web, and webpack + Username: admin@localhost:3000 + Password: mastodonadmin"