Created
January 13, 2020 16:54
-
-
Save timcunningham/8c5262164d04fbf2c0b876473b67acf6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Project = $args[0] | |
$repo = "IDMI/$Project.git" | |
$fullPath = "C:\Domains\$Project" | |
$getLocation = Get-Location | |
if (-not (Test-Path -Path $fullPath) ) { | |
Write-Output "Clone $repo to $fullPath" | |
git clone [email protected]:$repo $fullPath | |
cd $fullpath | |
git fetch integration | |
git branch integration | |
git pull origin integration | |
} | |
else { | |
Write-Output "$repo to C:\Domains\$Project already exists" | |
cd $fullpath | |
git fetch integration | |
git branch integration | |
git pull origin integration | |
} | |
Set-Location $getLocation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment