Skip to content

Last repository tag picked over first reachable when determining version #419

Open
@jxlambda

Description

Hi,

I have the following situation:

I have a Git repository, where the master branch serves as the development head, with tags for release points, and maintenance branches for previous major releases that receive bugfixes and tags for updates.

.
.
C
| B'
| |
B / A'
|   |
A __/
|
o

Where A, B and C are releases (let's presume v1.0.0, v2.0.0 and v3.0.0 respectively), and A' and B' are maintenance commits for the respective releases (let's assume v1.0.1 and v2.0.1).

When I generate an SBOM document for the module, as it is at B', the version detection malfunctions, and determines the version of the module to be whatever the latest tag is (in the example, this is C, i.e. v3.0.0). I've verified that it is the version control system tags that affect this, as after removing all tags from the repository, the result was a pseudo-version.

Is this the Go tooling that's doing this, or the cyclonedx-gomod utility incorrectly determining the version of the module?

Apologies in advance if this isn't the cyclonedx-gomod utilities fault - my Go-fu isn't great, and I'm just managing this aspect of the subject project.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions