Skip to content

Commit

Permalink
Use PowerShell to download Miniforge
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Jun 28, 2024
1 parent 92b4ada commit 4563707
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
15 changes: 6 additions & 9 deletions conda_smithy/templates/azure-pipelines-win.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@ jobs:
displayName: "Install Chocolatey Package: {{ choco_pkg }}"
{% endfor %}

- task: PythonScript@0
displayName: 'Download Miniforge'
inputs:
scriptSource: inline
script: |
import urllib.request
url = 'https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Windows-x86_64.exe'
path = r"$(Build.ArtifactStagingDirectory)/Miniforge.exe"
urllib.request.urlretrieve(url, path)
- powershell: |
Invoke-WebRequest $env:MINIFORGE_URL -OutFile $env:MINIFORGE_PATH
displayName: "Download Miniforge"
env:
MINIFORGE_URL: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Windows-x86_64.exe
MINIFORGE_PATH: $(Build.ArtifactStagingDirectory)/Miniforge.exe
- script: |
start /wait "" %BUILD_ARTIFACTSTAGINGDIRECTORY%\Miniforge.exe /InstallationType=JustMe /RegisterPython=0 /S /D=C:\Miniforge
Expand Down
23 changes: 23 additions & 0 deletions news/azure_win_download_miniforge_powershell.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* Switch to using PowerShell to download Miniforge

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>

0 comments on commit 4563707

Please sign in to comment.