Skip to content

CurrentVersion is returning old version #846

Open
@danshinton

Description

The plugin was working just fine until this release. Now it returning the wrong version. Here is the output of git tag:

1.0.0
1.1.0
1.1.0-SNAPSHOT
1.2.0
1.2.0-SNAPSHOT
1.3.0
1.3.0-SNAPSHOT
1.4.0
1.4.0-SNAPSHOT
1.5.0
1.5.0-SNAPSHOT
1.6.0
1.6.0-SNAPSHOT
1.7.0-SNAPSHOT

When executing gradle currentVersion I would expect it to return 1.7.0-SNAPSHOT. Instead it returns:

Project version: 1.6.0

This means when trying to do a release it says:

Working on released version 1.6.0, nothing to release

Relevant Gradle config:

plugins {
    id("pl.allegro.tech.build.axion-release").version("1.18.13")
}

scmVersion {
    useHighestVersion()
    tag {
        initialVersion({ _, _ -> "1.0.0" })
        prefix = ""
    }
    nextVersion {
        suffix.set("SNAPSHOT")
        separator.set("-")
    }
    versionIncrementer("incrementMinor")
    repository {
        pushTagsOnly.set(true)
        remote.set(System.getenv("CI_SERVER_URL") + "/" + System.getenv("CI_PROJECT_NAMESPACE") + "/" + System.getenv("CI_PROJECT_NAME") + ".git")
    }
}

How can I go about troubleshooting this?

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