Farmbot-Web-App/lib/tasks/api.rake

21 lines
565 B
Ruby
Raw Normal View History

2017-11-27 21:00:08 -07:00
# Going to make an `update` AND `upgrade` task that do the same thing
def same_thing
sh "git pull https://github.com/FarmBot/Farmbot-Web-App.git master"
sh "bundle install"
sh "yarn install"
sh "rails db:migrate"
end
2017-12-14 07:52:01 -07:00
2017-10-10 16:27:28 -06:00
namespace :api do
2017-10-10 16:33:47 -06:00
desc "Run Webpack and Rails"
2017-10-10 16:27:28 -06:00
task start: :environment do
sh "PORT=3000 bundle exec foreman start --procfile=Procfile.dev"
end
2017-11-27 21:00:08 -07:00
desc "Pull the latest Farmbot API version"
task(update: :environment) { same_thing }
desc "Pull the latest Farmbot API version"
task(upgrade: :environment) { same_thing }
2017-10-10 16:27:28 -06:00
end