select('role=production,role=stage'); desc('set shops online'); task('deploy:setShopsOnline', function() { if (has('bin/mysql') && strlen(get('bin/mysql')) && has('dbName') && strlen(get('dbName')) && has('dbConfPath') && strlen(get('dbConfPath')) && test("[ -f {{dbConfPath}} ]") ) { $query = "UPDATE oxshops SET oxactive = '1', OXREGISTERSUBJECT = SUBSTR(OXREGISTERSUBJECT, 3) WHERE oxactive = '0' AND OXREGISTERSUBJECT LIKE '..%';"; run('{{bin/mysql}} --defaults-extra-file={{dbConfPath}} {{dbName}} -e "'.$query.'"'); } else { info('missing config, task skipped'); } })->select('role=production,role=stage');