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 } |