/** * Get current file informations= */ protected function collectInformations() { $this->output->writeln('<info>Collecting informations...</info>'); // ################## // Current path // ################## $path = \Phar::running(false); if (empty($path)) { throw new \RuntimeException('Self-Update only supported in PHAR-mode'); } $this->cliToolsCommandPath = $path; // ################## // Get perms // ################## $this->cliToolsCommandPerms['perms'] = fileperms($this->cliToolsCommandPath); $this->cliToolsCommandPerms['owner'] = (int) fileowner($this->cliToolsCommandPath); $this->cliToolsCommandPerms['group'] = (int) filegroup($this->cliToolsCommandPath); // ################## // Set github defaults // ################## $this->githubRepo = $this->application->getConfigValue('config', 'github_repo', null); $this->githubReleaseUrl = 'https://api.github.com/repos/' . $this->githubRepo . '/releases'; }