Skip to content

Commit

Permalink
Use constant as version base for patch releases
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Oct 30, 2023
1 parent e0adc39 commit 8cc8fc4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions monorepo/DevTools/src/MonorepoReleaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@ protected function askForNewVersion(): void
{
$this->newVersionType = $this->choice('What type of release is this?', static::VERSION_TYPES, 1);

if ($this->newVersionType === 'patch') {
if ($this->currentVersion !== 'v'.HydeKernel::VERSION) {
$this->info('Updating base to use framework constant');
}
$this->currentVersion = 'v'.HydeKernel::VERSION;
$this->currentVersionParts = explode('.', ltrim($this->currentVersion, 'v'));
}

$major = $this->currentVersionParts[0];
$minor = $this->currentVersionParts[1];
$patch = $this->currentVersionParts[2];
Expand Down

0 comments on commit 8cc8fc4

Please sign in to comment.