src/Console/InitCommand.php
protected function setupSources()
    {
        /** @var Repository $config */
        $config = $this->container['config'];
        $cwd = getcwd();
        $source = [];

        $this->output->writeln("Working directory is <path>{$cwd}</path>");

        $this->title('Sources');

        if ($this->isGitRepo('.')) {

            $this->output->writeln("It looks your project already has a git repository.\n");

            if ($this->confirm('Would you like to store your steak sources in a <b>separate</b> repo/branch?', false)) {

                $source['git.directory'] = $this->ask(
                    "Where should we check out the site sources <b>repository</b>?",
                    $config->get('source.directory', 'steak')
                );
                // @todo if the sources repo already exists, try reading values from there instead of config?
                $source['git.url'] = $this->ask(
                    "Enter the source repository URL:",
                    $config->get('source.git.url', $this->getPushUrl('.'))
                );
                $source['git.branch'] = $this->ask(
                    "Specify the branch to use:",
                    $config->get('source.git.branch', 'gh-pages-src')
                );

            } else { // not using a separate source vcs

                $this->output->writeln([
                    "  Okay, no problem, just commit your steak sources as part of your standard workflow.",
                    "  The <comment>steak pull</comment> command will have no effect.",
                    ""
                ]);

                $source['directory'] = $this->ask(
                    "Where are the <b>source files</b> kept?",
                    $config->get('source.directory', 'source')
                );
            }

        } else { // not running inside a git repo

            $this->output->writeln("working directory not under git", OutputInterface::VERBOSITY_VERBOSE);

            if ($this->confirm('Would you like to store your steak sources in a git repo?')) {

                $source['directory'] = $this->ask(
                    "Where should we check out the site sources <b>repository</b>?",
                    $config->get('source.directory', 'steak')
                );
                $source['git.url'] = $this->ask(
                    "Enter the source repository URL:",
                    $config->get('source.git.url'),
                    $this->valueRequiredValidator()
                );
                $source['git.branch'] = $this->ask(
                    "Specify the branch to use:",
                    $config->get('source.git.branch', 'master')
                );

            } else {

                $this->output->writeln("  Okay, no git.");

                $source['directory'] = $this->ask(
                    "Where to put the steak <b>source files</b>?",
                    $config->get('source.directory', 'sources')
                );

            }
        }

        return $source;
    }
protected function setupSources()
    {
        /** @var Repository $config */
        $config = $this->container['config'];
        $cwd = getcwd();
        $source = [];

        $this->output->writeln("Working directory is <path>{$cwd}</path>");

        $this->title('Sources');

        if ($this->isGitRepo('.')) {

            $this->output->writeln("It looks your project already has a git repository.\n");

            if ($this->confirm('Would you like to store your steak sources in a <b>separate</b> repo/branch?', false)) {

                $source['git.directory'] = $this->ask(
                    "Where should we check out the site sources <b>repository</b>?",
                    $config->get('source.directory', 'steak')
                );
                // @todo if the sources repo already exists, try reading values from there instead of config?
                $source['git.url'] = $this->ask(
                    "Enter the source repository URL:",
                    $config->get('source.git.url', $this->getPushUrl('.'))
                );
                $source['git.branch'] = $this->ask(
                    "Specify the branch to use:",
                    $config->get('source.git.branch', 'gh-pages-src')
                );

            } else { // not using a separate source vcs

                $this->output->writeln([
                    "  Okay, no problem, just commit your steak sources as part of your standard workflow.",
                    "  The <comment>steak pull</comment> command will have no effect.",
                    ""
                ]);

                $source['directory'] = $this->ask(
                    "Where are the <b>source files</b> kept?",
                    $config->get('source.directory', 'source')
                );
            }

        } else { // not running inside a git repo

            $this->output->writeln("working directory not under git", OutputInterface::VERBOSITY_VERBOSE);

            if ($this->confirm('Would you like to store your steak sources in a git repo?')) {

                $source['directory'] = $this->ask(
                    "Where should we check out the site sources <b>repository</b>?",
                    $config->get('source.directory', 'steak')
                );
                $source['git.url'] = $this->ask(
                    "Enter the source repository URL:",
                    $config->get('source.git.url'),
                    $this->valueRequiredValidator()
                );
                $source['git.branch'] = $this->ask(
                    "Specify the branch to use:",
                    $config->get('source.git.branch', 'master')
                );

            } else {

                $this->output->writeln("  Okay, no git.");

                $source['directory'] = $this->ask(
                    "Where to put the steak <b>source files</b>?",
                    $config->get('source.directory', 'sources')
                );

            }
        }

        return $source;
    }
protected function setupSources ( ) { /** @var Repository $config */ $ config = $ this -> container [ 'config' ] ; $ cwd = getcwd ( ) ; $ source = [ ] ; $ this -> output -> writeln ( "Working directory is <path>{$cwd}</path>" ) ; $ this -> title ( 'Sources' ) ; if ( $ this -> isGitRepo ( '.' ) ) { $ this -> output -> writeln ( "It looks your project already has a git repository.\n" ) ; if ( $ this -> confirm ( 'Would you like to store your steak sources in a <b>separate</b> repo/branch?' , false ) ) { $ source [ 'git.directory' ] = $ this -> ask ( "Where should we check out the site sources <b>repository</b>?" , $ config -> get ( 'source.directory' , 'steak' ) ) ; // @todo if the sources repo already exists, try reading values from there instead of config? $ source [ 'git.url' ] = $ this -> ask ( "Enter the source repository URL:" , $ config -> get ( 'source.git.url' , $ this -> getPushUrl ( '.' ) ) ) ; $ source [ 'git.branch' ] = $ this -> ask ( "Specify the branch to use:" , $ config -> get ( 'source.git.branch' , 'gh-pages-src' ) ) ; } else { // not using a separate source vcs $ this -> output -> writeln ( [ "  Okay, no problem, just commit your steak sources as part of your standard workflow." , "  The <comment>steak pull</comment> command will have no effect." , "" ] ) ; $ source [ 'directory' ] = $ this -> ask ( "Where are the <b>source files</b> kept?" , $ config -> get ( 'source.directory' , 'source' ) ) ; } } else { // not running inside a git repo $ this -> output -> writeln ( "working directory not under git" , OutputInterface :: VERBOSITY_VERBOSE ) ; if ( $ this -> confirm ( 'Would you like to store your steak sources in a git repo?' ) ) { $ source [ 'directory' ] = $ this -> ask ( "Where should we check out the site sources <b>repository</b>?" , $ config -> get ( 'source.directory' , 'steak' ) ) ; $ source [ 'git.url' ] = $ this -> ask ( "Enter the source repository URL:" , $ config -> get ( 'source.git.url' ) , $ this -> valueRequiredValidator ( ) ) ; $ source [ 'git.branch' ] = $ this -> ask ( "Specify the branch to use:" , $ config -> get ( 'source.git.branch' , 'master' ) ) ; } else { $ this -> output -> writeln ( "  Okay, no git." ) ; $ source [ 'directory' ] = $ this -> ask ( "Where to put the steak <b>source files</b>?" , $ config -> get ( 'source.directory' , 'sources' ) ) ; } } return $ source ; }
Get the config values related to steak sources.

@return array
Get the config values related to steak sources .