Skip to content

Commit

Permalink
fix: ensure tag name is set when version discovered
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
weierophinney committed Sep 15, 2020
1 parent 0c48f07 commit 39edd23
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 1 addition & 0 deletions src/Version/DiscoverVersionEventTrait.php
Expand Up @@ -15,6 +15,7 @@ trait DiscoverVersionEventTrait
public function foundVersion(string $version): void
{
$this->version = $version;
$this->tagName = $this->tagName ?: $version;
}

public function versionNotAccepted(): void
Expand Down
6 changes: 0 additions & 6 deletions src/Version/ReleaseEvent.php
Expand Up @@ -77,12 +77,6 @@ public function setReleaseName(string $releaseName): void
$this->releaseName = $releaseName;
}

public function foundVersion(string $version): void
{
$this->version = $version;
$this->tagName = $this->tagName ?: $version;
}

public function releaseCreated(string $release): void
{
$this->output()->writeln(sprintf('<info>Created %s<info>', $release));
Expand Down

0 comments on commit 39edd23

Please sign in to comment.