Skip to content

isDirty is returning true incorrectly #910

@dwagmuse

Description

@dwagmuse

Using latest 3.1.0 version of gitVersion in a gradle build I run locally and in a Docker container in Jenkins.

Specifically, I'm running a tagged release process on a HEAD branch with a tag.

On Mac sonoma I see expected behavior where gitVersion identifies the tag name and isDirty=false. But when i run the same workflow in a linux docker container the isDirty property returns true on the same commit/tag where it returns false locally. That's causing the project.version property to be set to TAGNAME.dirty in the Jenkins build.

I can exec 'git status --porcelain' command in the container directly the output appears to be blank but I can't tell whether that output might contain a newline or other whitespace that might be invisible. I see that gitVersion is expecting the command output to be empty and that's what it looks like it is returning. Possibly the java call should be removing whitespace from the response before checking isempty?

Metadata

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