Lines Matching +full:php +full:- +full:version

1 <?php
4 require_once(DOKU_INC . 'vendor/autoload.php');
5 require_once DOKU_INC . 'inc/load.php';
25 $this->BASERAW = 'https://raw.githubusercontent.com/' . $repo . '/stable/';
32 $options->setHelp('This tool is used to gather and check data for building a release');
34 $options->registerCommand('new', 'Get environment for creating a new release');
35 …$options->registerOption('type', 'The type of release to build', null, join('|', self::TYPES), 'ne…
36 …$options->registerOption('date', 'The date to use for the version. Defaults to today', null, 'YYYY
37 …$options->registerOption('name', 'The codename to use for the version. Defaults to the last used o…
39 $options->registerCommand('current', 'Get environment of the current release');
44 switch ($options->getCmd()) {
46 $this->prepareNewEnvironment($options);
49 $this->prepareCurrentEnvironment($options);
52 echo $options->help();
61 $current = $this->getLocalVersion();
62 // we name files like the string in the VERSION file, with rc at the front
76 $current = $this->getUpstreamVersion();
80 'type' => $options->getOpt('type'),
81 'date' => $options->getOpt('date'),
82 'codename' => $options->getOpt('name'),
86 if (!$next['date']) $next['date'] = date('Y-m-d');
98 $next['hotfix'] = $this->increaseHotfix($current['hotfix']);
103 if (!preg_match('/^\d{4}-\d{2}-\d{2}$/', $next['date'])) {
104 throw new \splitbrain\phpcli\Exception('Invalid date format, use YYYY-MM-DD');
121 $next['version'] = $next['date'] . ($next['type'] === 'rc' ? 'rc' : $next['hotfix']);
137 * Get current version info from local VERSION file
143 $versioninfo = \dokuwiki\Info::parseVersionString(trim(file_get_contents('VERSION')));
144 $doku = file_get_contents('doku.php');
146 throw new \Exception('Could not find $updateVersion in doku.php');
153 * Get current version info from stable branch
160 // basic version info
161 …sioninfo = \dokuwiki\Info::parseVersionString(trim(file_get_contents($this->BASERAW . 'VERSION')));
163 // update version grepped from the doku.php file
164 $doku = file_get_contents($this->BASERAW . 'doku.php');
166 throw new \Exception('Could not find $updateVersion in doku.php');
184 return substr($hotfix, 0, -1) . chr(ord($hotfix) + 1);
188 (new Release())->run();