RamblingCookieMonster / BuildHelpers

Helper functions for PowerShell CI/CD scenarios
MIT License
214 stars 47 forks source link

Get-Buildvariable overwrites CommitMessage on switch default #126

Closed jfishe closed 4 years ago

jfishe commented 4 years ago

https://github.com/RamblingCookieMonster/BuildHelpers/blob/f385bd8b68bf49d24938fdea3fdec3eb83858817/BuildHelpers/Public/Get-BuildVariable.ps1#L246 sets CommitMessage instead of CommitHash.

From the context, I think the following was intended:

if(-not $CommitHash)
    {
        if($WeCanGit)
        {
            $CommitHash = Invoke-Git @IGParams -Arguments "log --format=%H -n 1"
        }        
    }
RamblingCookieMonster commented 4 years ago

Yikes, yes, that. Or move the wecangit conditional into default for the switch. thanks for catching this!! fancy a PR?

RamblingCookieMonster commented 4 years ago

FIxed in 2.0.13! Ouch. Thanks again for the heads up : )