Skip to content

Commit 291f498

Browse files
committed
fix: simplify further
1 parent 1925b63 commit 291f498

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

Dockerfile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ WORKDIR "C:/Program Files/Vector"
1010

1111
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
1212

13-
RUN if ($env:VECTOR_VERSION) { \
14-
$version = $env:VECTOR_VERSION; \
15-
Write-Host "Using pinned VECTOR_VERSION: $version"; \
16-
} else { \
17-
Write-Host "VECTOR_VERSION not set. Fetching latest version from GitHub API..."; \
18-
$apiUrl = "https://api.github.com/repos/vectordotdev/vector/releases/latest"; \
19-
$releaseInfo = Invoke-RestMethod -Uri $apiUrl; \
20-
$version = $releaseInfo.tag_name.TrimStart('v'); \
21-
Write-Host "Latest version found: $version"; \
22-
} \
23-
$url = "https://github.com/vectordotdev/vector/releases/download/v${version}/vector-${version}-x86_64-pc-windows-msvc.zip"; \
24-
Write-Host "Download URL: $url"; \
25-
Invoke-WebRequest -UseBasicParsing -Uri $url -OutFile "vector.zip"; \
26-
Expand-Archive -Path "vector.zip" -DestinationPath "."; \
13+
RUN if ($env:VECTOR_VERSION) { `
14+
$version = $env:VECTOR_VERSION; `
15+
Write-Host "Using pinned VECTOR_VERSION: $version"; `
16+
} else { `
17+
Write-Host "VECTOR_VERSION not set. Fetching latest version from GitHub API..."; `
18+
$apiUrl = "https://api.github.com/repos/vectordotdev/vector/releases/latest"; `
19+
$releaseInfo = Invoke-RestMethod -Uri $apiUrl; `
20+
$version = $releaseInfo.tag_name.TrimStart('v'); `
21+
Write-Host "Latest version found: $version"; `
22+
} `
23+
$url = "https://github.com/vectordotdev/vector/releases/download/v${version}/vector-${version}-x86_64-pc-windows-msvc.zip"; `
24+
Write-Host "Download URL: $url"; `
25+
Invoke-WebRequest -UseBasicParsing -Uri $url -OutFile "vector.zip"; `
26+
Expand-Archive -Path "vector.zip" -DestinationPath "."; `
2727
Remove-Item "vector.zip" -Force
2828

2929
RUN setx /M PATH "%PATH%;C:\Program Files\Vector\bin"

0 commit comments

Comments
 (0)