Fetching contributors…
Cannot retrieve contributors at this time
67 lines (54 sloc) 1.25 KB
@echo off
if not "%nocls%"=="1" cls
set nocls=1
set task=%1
if "%task%"=="" goto :help
goto :%task%
if not %errorlevel%==0 goto :help
goto :end
msg %username% "hi"
goto :next
echo Deploying...
call cap deploy
goto :next
echo Updating...
call cap deploy:update
goto :next
echo Starting solr...
call cap invoke COMMAND="cd /mnt/app/current;rake solr:stop RAILS_ENV=production;nohup rake solr:start RAILS_ENV=production > /dev/null 2>&1 &"
goto :next
echo Migrating...
call cap deploy:migrate
goto :next
echo Reindexing solr (remember, it needs to be started first!)...
call cap invoke COMMAND="cd /mnt/app/current;rake solr:reindex RAILS_ENV=production"
goto :next
%0 update then migrate then start_solr then deploy
goto :end
goto :next
%0 %2 %3 %4 %5 %6 %7 %8 %9 end
goto :end
echo %~n0
echo Runs multiple cap commands in a row.
echo Syntax: %~n0 [command1 [THEN command2 [THEN command3 ... ] ] ]
echo Supported commands: deploy, update, start_solr, migrate, do_everything, notify
echo do_everything = update then migrate then start_solr then deploy
echo notify gives you a nice notify. Use it like '%~n0 update then notify'
goto :end