Functions/Set-LocalDevBranch.ps1

Function Set-LocalDevBranch {
    [cmdletbinding()]
    param(
        [string] $branch,
        [PSCustomObject] $config
    )

    if ([string]::IsNullOrEmpty($branch)) {
        Write-Host "No branch provided, am getting from git..."
        $branch = &git rev-parse --abbrev-ref HEAD
    }
    [string]$databricksPath = $config.dataBricksPath 
    $databricksPath = $databricksPath.Replace('__branch__', $branch)
    $config.DataBricksPath = $databricksPath
    return $config
}