Download PowerShell-master/.pipelines/templates/cloneToOfficialPath.yml from MegaBites-AI/Windows-powershell: direct link, hf CLI and curl.
- Browser
- Download file 1.31 kB
-
https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/.pipelines/templates/cloneToOfficialPath.yml
- Command line
-
hf download hf://datasets/MegaBites-AI/Windows-powershell/PowerShell-master/.pipelines/templates/cloneToOfficialPath.yml
-
curl -L -o cloneToOfficialPath.yml https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/.pipelines/templates/cloneToOfficialPath.yml
1.31 kB
| parameters: | |
| - name: nativePathRoot | |
| default: '' | |
| - name: ob_restore_phase | |
| type: boolean | |
| default: true | |
| steps: | |
| - powershell: | | |
| $dirSeparatorChar = [system.io.path]::DirectorySeparatorChar | |
| $nativePath = "${{parameters.nativePathRoot }}${dirSeparatorChar}PowerShell" | |
| Write-Host "##vso[task.setvariable variable=PowerShellRoot]$nativePath" | |
| if ((Test-Path "$nativePath")) { | |
| Remove-Item -Path "$nativePath" -Force -Recurse -Verbose -ErrorAction ignore | |
| } | |
| else { | |
| Write-Verbose -Verbose -Message "No cleanup required." | |
| } | |
| # REPOROOT must be set by the pipeline - this is where the repository was checked out | |
| $sourceDir = $env:REPOROOT | |
| if (-not $sourceDir) { throw "REPOROOT environment variable is not set. This step depends on REPOROOT being configured in the pipeline." } | |
| $buildModulePath = Join-Path $sourceDir "build.psm1" | |
| if (-not (Test-Path $buildModulePath)) { throw "build.psm1 not found at: $buildModulePath. REPOROOT must point to the PowerShell repository root." } | |
| Write-Verbose -Verbose -Message "Cloning from: $sourceDir to $nativePath" | |
| git clone --quiet $sourceDir $nativePath | |
| displayName: Clone PowerShell Repo to /PowerShell | |
| errorActionPreference: silentlycontinue | |
| env: | |
| ob_restore_phase: ${{ parameters.ob_restore_phase }} | |