Skip to content

Commit 39edd23

Browse files
committed
fix: ensure tag name is set when version discovered
When running `release:tag`, the tag name was not getting set once the version was discovered, which was leading to an error indicating no tag name was provided.
1 parent 0c48f07 commit 39edd23

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/Version/DiscoverVersionEventTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ trait DiscoverVersionEventTrait
1515
public function foundVersion(string $version): void
1616
{
1717
$this->version = $version;
18+
$this->tagName = $this->tagName ?: $version;
1819
}
1920

2021
public function versionNotAccepted(): void

src/Version/ReleaseEvent.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ public function setReleaseName(string $releaseName): void
7777
$this->releaseName = $releaseName;
7878
}
7979

80-
public function foundVersion(string $version): void
81-
{
82-
$this->version = $version;
83-
$this->tagName = $this->tagName ?: $version;
84-
}
85-
8680
public function releaseCreated(string $release): void
8781
{
8882
$this->output()->writeln(sprintf('<info>Created %s<info>', $release));

0 commit comments

Comments
 (0)