Last active
February 4, 2019 08:57
-
-
Save jhorsman/8972c0d6cc52a5d60ceb to your computer and use it in GitHub Desktop.
Fetch multiple GIT repos
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
$ErrorActionPreference = "Stop" | |
Function FetchRepo($directory) | |
{ | |
git -C $directory fetch | |
if ($LASTEXITCODE -gt 0) | |
{ | |
Throw "Something went wrong while fetching $directory" | |
} | |
Write-Host -ForegroundColor green "fetched $directory" | |
} | |
Write-Verbose "Fetching all DXA repos" | |
FetchRepo(".\content-management") | |
FetchRepo(".\dd4t-java") | |
FetchRepo(".\html-design") | |
FetchRepo(".\installation") | |
FetchRepo(".\web-application") | |
FetchRepo(".\web-application-java") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment