aboutsummaryrefslogtreecommitdiff
path: root/ci/install.ps1
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-06-05 14:44:08 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-06-05 14:44:08 -0400
commit9eed4022a79f2cba139c9f8a359bfc8c1f9c31c5 (patch)
tree5bd97ad742dddf5ee488afd2fcd314efef9cf642 /ci/install.ps1
parentf9e2109c27af5ece546261c018d4b2781860ff1c (diff)
ci: Stage blocking changes
Diffstat (limited to 'ci/install.ps1')
-rw-r--r--ci/install.ps111
1 files changed, 4 insertions, 7 deletions
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