Skip to content

Commit 65dd5f9

Browse files
authored
Fix the Windows nightly Dockerfiles to use SWIFT_URL and escape the quotes for the download url (#378)
1 parent ed20023 commit 65dd5f9

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

nightly-6.0/windows/1809/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:VSB});
129129
# Install Swift toolchain.
130130
ARG SWIFT_RELEASE_METADATA=http://download.swift.org/swift-6.0-branch/windows10/latest-build.json
131131
RUN $env:Release = curl.exe -sL ${env:SWIFT_RELEASE_METADATA}; \
132-
$env:SWIFT = "https://download.swift.org/swift-6.0-branch/windows10/$($($env:Release | ConvertFrom-JSON).dir)/$($($env:Release | ConvertFrom-JSON).download)"; \
133-
Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:SWIFT}); \
134-
Invoke-WebRequest -Uri ${env:SWIFT} -OutFile installer.exe; \
132+
$env:SWIFT_URL = "\"https://download.swift.org/swift-6.0-branch/windows10/$($($env:Release | ConvertFrom-JSON).dir)/$($($env:Release | ConvertFrom-JSON).download)\""; \
133+
Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:SWIFT_URL}); \
134+
Invoke-WebRequest -Uri ${env:SWIFT_URL} -OutFile installer.exe; \
135135
Write-Host '✓'; \
136136
Write-Host -NoNewLine 'Installing Swift ... '; \
137137
$Process = \

nightly-6.0/windows/LTSC2022/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:VSB});
129129
# Install Swift toolchain.
130130
ARG SWIFT_RELEASE_METADATA=http://download.swift.org/swift-6.0-branch/windows10/latest-build.json
131131
RUN $env:Release = curl.exe -sL ${env:SWIFT_RELEASE_METADATA}; \
132-
$env:SWIFT = "https://download.swift.org/swift-6.0-branch/windows10/$($($env:Release | ConvertFrom-JSON).dir)/$($($env:Release | ConvertFrom-JSON).download)"; \
133-
Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:SWIFT}); \
134-
Invoke-WebRequest -Uri ${env:SWIFT} -OutFile installer.exe; \
132+
$env:SWIFT_URL = "\"https://download.swift.org/swift-6.0-branch/windows10/$($($env:Release | ConvertFrom-JSON).dir)/$($($env:Release | ConvertFrom-JSON).download)\""; \
133+
Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:SWIFT_URL}); \
134+
Invoke-WebRequest -Uri ${env:SWIFT_URL} -OutFile installer.exe; \
135135
Write-Host '✓'; \
136136
Write-Host -NoNewLine 'Installing Swift ... '; \
137137
$Process = \

nightly-main/windows/1809/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:VSB});
129129
# Install Swift toolchain.
130130
ARG SWIFT_RELEASE_METADATA=http://download.swift.org/development/windows10/latest-build.json
131131
RUN $env:Release = curl.exe -sL ${env:SWIFT_RELEASE_METADATA}; \
132-
$env:SWIFT = "https://download.swift.org/development/windows10/$($($env:Release | ConvertFrom-JSON).dir)/$($($env:Release | ConvertFrom-JSON).download)"; \
133-
Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:SWIFT}); \
134-
Invoke-WebRequest -Uri ${env:SWIFT} -OutFile installer.exe; \
132+
$env:SWIFT_URL = "\"https://download.swift.org/development/windows10/$($($env:Release | ConvertFrom-JSON).dir)/$($($env:Release | ConvertFrom-JSON).download)\""; \
133+
Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:SWIFT_URL}); \
134+
Invoke-WebRequest -Uri ${env:SWIFT_URL} -OutFile installer.exe; \
135135
Write-Host '✓'; \
136136
Write-Host -NoNewLine 'Installing Swift ... '; \
137137
$Process = \

nightly-main/windows/LTSC2022/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:VSB});
129129
# Install Swift toolchain.
130130
ARG SWIFT_RELEASE_METADATA=http://download.swift.org/development/windows10/latest-build.json
131131
RUN $env:Release = curl.exe -sL ${env:SWIFT_RELEASE_METADATA}; \
132-
$env:SWIFT = "https://download.swift.org/development/windows10/$($($env:Release | ConvertFrom-JSON).dir)/$($($env:Release | ConvertFrom-JSON).download)"; \
133-
Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:SWIFT}); \
134-
Invoke-WebRequest -Uri ${env:SWIFT} -OutFile installer.exe; \
132+
$env:SWIFT_URL = "\"https://download.swift.org/development/windows10/$($($env:Release | ConvertFrom-JSON).dir)/$($($env:Release | ConvertFrom-JSON).download)\""; \
133+
Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:SWIFT_URL}); \
134+
Invoke-WebRequest -Uri ${env:SWIFT_URL} -OutFile installer.exe; \
135135
Write-Host '✓'; \
136136
Write-Host -NoNewLine 'Installing Swift ... '; \
137137
$Process = \

0 commit comments

Comments
 (0)