protected function run(\DialoGit\Dialoger $dialoger) { $picker = new \DialoGit\Picker\Remote($dialoger); $remotes = $picker->pickMany('Select one or more remote repositories to <b>remove</b>:'); $thisThese = count($remotes) == 1 ? 'this remote repository' : 'these remote repositories'; $dialoger->dialogConfirm('Do you wish to <b>remove</b> ' . $thisThese . ' for sure?\\n\\n' . implode("\n", $remotes)); foreach ($remotes as $remote) { $dialoger->runGit('remote remove ' . $remote); } }
protected function run(\DialoGit\Dialoger $dialoger) { $remotesPicker = new \DialoGit\Picker\Remote($dialoger); $remotes = $remotesPicker->pickMany('Pick one or more remotes repositories on to <b>push</b>:'); $tagsPicker = new \DialoGit\Picker\Tag($dialoger); $tags = $tagsPicker->pickMany('Pick one or more tags to <b>push</b>:'); foreach ($remotes as $remote) { foreach ($tags as $tag) { $dialoger->runGitOnNewShell('push ' . $remote . ' ' . $tag); sleep(1); } } }