Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions nightly-main/windows/1809/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:VSB});
# Install Swift toolchain.
ARG SWIFT_RELEASE_METADATA=https://download.swift.org/development/windows10/latest-build.json
RUN $Release = curl.exe -sL ${env:SWIFT_RELEASE_METADATA} | ConvertFrom-JSON; \
Write-Host ('({0})' -f $Release); \
Write-Host -NoNewLine 'Release metadata ... '; \
if ($Release.dir -and $Release.download) { \
Write-Host '✓'; \
} else { \
Write-Host '✘ Missing fields.'; \
exit 1; \
} \
$SWIFT_URL = "\"https://download.swift.org/development/windows10/$($Release.dir)/$($Release.download)\""; \
Write-Host -NoNewLine ('Downloading {0} ... ' -f ${SWIFT_URL}); \
Invoke-WebRequest -Uri ${SWIFT_URL} -OutFile installer.exe; \
Expand Down
8 changes: 8 additions & 0 deletions nightly-main/windows/LTSC2022/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:VSB});
# Install Swift toolchain.
ARG SWIFT_RELEASE_METADATA=https://download.swift.org/development/windows10/latest-build.json
RUN $Release = curl.exe -sL ${env:SWIFT_RELEASE_METADATA} | ConvertFrom-JSON; \
Write-Host ('({0})' -f $Release); \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will dump the json to the console - fine for debugging, but shouldn't be committed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@compnerd Are there any concerns about dumping the JSON file to the console? The JSON file is just a few lines long. I’m intentionally doing this so that if there are any failures, we can see what it contained and help us understand why it doesn’t contain the expected values.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes it harder to see what is going on. If you want to do this at the end of the run if there are failures, that is fine, but we shouldn't do this in all cases IMO.

Write-Host -NoNewLine 'Release metadata ... '; \
if ($Release.dir -and $Release.download) { \
Write-Host '✓'; \
} else { \
Write-Host '✘ Missing fields.'; \
exit 1; \
} \
$SWIFT_URL = "\"https://download.swift.org/development/windows10/$($Release.dir)/$($Release.download)\""; \
Write-Host -NoNewLine ('Downloading {0} ... ' -f ${SWIFT_URL}); \
Invoke-WebRequest -Uri ${SWIFT_URL} -OutFile installer.exe; \
Expand Down
8 changes: 8 additions & 0 deletions nightly-main/windows/LTSC2025/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:VSB});
# Install Swift toolchain.
ARG SWIFT_RELEASE_METADATA=https://download.swift.org/development/windows10/latest-build.json
RUN $Release = curl.exe -sL ${env:SWIFT_RELEASE_METADATA} | ConvertFrom-JSON; \
Write-Host ('({0})' -f $Release); \
Write-Host -NoNewLine 'Release metadata ... '; \
if ($Release.dir -and $Release.download) { \
Write-Host '✓'; \
} else { \
Write-Host '✘ Missing fields.'; \
exit 1; \
} \
$SWIFT_URL = "\"https://download.swift.org/development/windows10/$($Release.dir)/$($Release.download)\""; \
Write-Host -NoNewLine ('Downloading {0} ... ' -f ${SWIFT_URL}); \
Invoke-WebRequest -Uri ${SWIFT_URL} -OutFile installer.exe; \
Expand Down
Loading