Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

[MonorepoBuilder] Incorrect version in release command #2972

Closed
SerafimArts opened this issue Feb 19, 2021 · 7 comments · Fixed by #2997
Closed

[MonorepoBuilder] Incorrect version in release command #2972

SerafimArts opened this issue Feb 19, 2021 · 7 comments · Fixed by #2997

Comments

@SerafimArts
Copy link

An incorrect version string is generated during release (missing prefix v).

This is regression bug: The behavior changes between 7.x and 8.x branches. The error is not related to the operating system or the PHP version.

P.S. I also do not like the prefix v, but this is the way it is on the project.

Reproduce

  • monorepo-builder release "v1.0.0"

Expected

Release, named v1.0.0

Actual

Release, named 1.0.0

@TomasVotruba
Copy link
Member

Hi, we'll need a failing test case for this.

@SerafimArts
Copy link
Author

SerafimArts commented Feb 19, 2021

I didn't find any integration tests. And the unit tests of the version will cover this class: https://github.com/phar-io/version/blob/master/src/Version.php

The problem is that this object is used directly as tags: $version->getVersionString(). Which loses all version information except numbers.

Maybe the version should be passed as a string? And parse only in those places where we need to get version info.

@TomasVotruba
Copy link
Member

TomasVotruba commented Feb 19, 2021

It might require a new test, it's ok

@addshore
Copy link
Contributor

So it looks like this was a change in phar-io that caused this rather than something in symplify

Specifically the change to this line phar-io/version@8cef51d#diff-9cb52248cb807e881c8c2b95169d98aa095f95ee40639b13af3b9f28cc553122L42

@TomasVotruba
Copy link
Member

@addshore Thank you for the investigation!

@addshore
Copy link
Contributor

Should be easy to fix once there is a new version to use phar-io/version#26

@addshore
Copy link
Contributor

There is a new release, so I'll pick this one up now!

TomasVotruba pushed a commit that referenced this issue Feb 23, 2021
* [MonorepoBuilder] Use original version string for tag Fixes #2972

* propagate phar-io/version version
@deprecated-packages deprecated-packages locked as resolved and limited conversation to collaborators Jun 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants