From 9eed4022a79f2cba139c9f8a359bfc8c1f9c31c5 Mon Sep 17 00:00:00 2001 From: vnugent Date: Wed, 5 Jun 2024 14:44:08 -0400 Subject: ci: Stage blocking changes --- ci/install.ps1 | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'ci/install.ps1') diff --git a/ci/install.ps1 b/ci/install.ps1 index 4c42c18..7a5c455 100644 --- a/ci/install.ps1 +++ b/ci/install.ps1 @@ -1,15 +1,12 @@ -param([String] $BaseUrl, [String] $ModuleName, [String] $ProjectName, [String]$FileName) +param([String] $BaseUrl, [String] $ModuleName, [String] $ProjectName, [String]$FileName, [String]$Version) -#get the latest file -Invoke-WebRequest "$BaseUrl/$ModuleName/@latest" -OutFile latest.txt -#read the file into a variable -$latest = Get-Content latest.txt +$_src = "$BaseUrl/$ModuleName/$Version/$ProjectName/$FileName" #download the latest version -Invoke-WebRequest "$BaseUrl/$ModuleName/$latest/$ProjectName/$FileName" -OutFile $FileName +Invoke-WebRequest "$_src" -OutFile $FileName #download latest sha256 -Invoke-WebRequest "$BaseUrl/$ModuleName/$latest/$ProjectName/$FileName.sha256" -OutFile "$FileName.sha256" +Invoke-WebRequest "$_src.sha256" -OutFile "$FileName.sha256" #verify the file $hash = (Get-FileHash $FileName -Algorithm SHA256).Hash -- cgit