Skip to content

Commit 02f4fe6

Browse files
authored
Merge pull request #1424 from hydephp/add-monorepo-tools
Update internal releaser to use constant as version base for patch releases
2 parents e0adc39 + 8cc8fc4 commit 02f4fe6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

monorepo/DevTools/src/MonorepoReleaseCommand.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ protected function askForNewVersion(): void
119119
{
120120
$this->newVersionType = $this->choice('What type of release is this?', static::VERSION_TYPES, 1);
121121

122+
if ($this->newVersionType === 'patch') {
123+
if ($this->currentVersion !== 'v'.HydeKernel::VERSION) {
124+
$this->info('Updating base to use framework constant');
125+
}
126+
$this->currentVersion = 'v'.HydeKernel::VERSION;
127+
$this->currentVersionParts = explode('.', ltrim($this->currentVersion, 'v'));
128+
}
129+
122130
$major = $this->currentVersionParts[0];
123131
$minor = $this->currentVersionParts[1];
124132
$patch = $this->currentVersionParts[2];

0 commit comments

Comments
 (0)