add dev update script

This commit is contained in:
Izalia Mae 2019-07-26 17:53:22 -04:00
parent 1921796050
commit 51e822f49a

27
dist/update-dev.sh vendored Executable file
View file

@ -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"