-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Anthony Watherston <[email protected]>
- Loading branch information
Showing
9 changed files
with
555 additions
and
340 deletions.
There are no files selected for viewing
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
function Get-HydrationEpacRepo { | ||
[CmdletBinding()] | ||
param ( | ||
[Parameter()] | ||
[String] | ||
$RepoRoot = "./" | ||
) | ||
if (Test-Path $RepoRoot) { | ||
$RepoRoot = Resolve-Path $RepoRoot | ||
$repoTempPath = Join-Path $RepoRoot "epacRepo" | ||
$starterKitSourcePath = Join-Path $repoTempPath "StarterKit" | ||
$starterKitDestinationPath = Join-Path $RepoRoot "StarterKit" | ||
Write-Host "Downloading HydrationKit from GitHub to $RepoRoot" -ForegroundColor Green | ||
$url = "https://github.com/Azure/enterprise-azure-policy-as-code.git" | ||
if (!(Test-Path $repoTempPath)) { | ||
$null = New-Item -ItemType Directory -Path $repoTempPath -ErrorAction SilentlyContinue | ||
|
||
} | ||
# $null = Remove-Item -Recurse -Force $repoTempPath -ErrorAction SilentlyContinue | ||
# git clone $url $repoTempPath | ||
Write-Host "This will create a popup terminal window" | ||
Start-Process git -ArgumentList "clone $url $repoTempPath" -Wait | ||
$null = Copy-Item $starterKitSourcePath $starterKitDestinationPath -Recurse -Force -ErrorAction SilentlyContinue | ||
} | ||
else { | ||
Write-Error "Error: Download failed, destination path $RepoRoot does not exist." | ||
return | ||
} | ||
} |
File renamed without changes.
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
Oops, something went wrong.