Repository navigation
Closed
Milestone
Description
It doesn't look like we can specify a version to download in dagger using the instructions here: https://docs.dagger.io/quickstart/729237/cli:
$script = Invoke-WebRequest -UseBasicParsing -Uri https://dl.dagger.io/dagger/install.ps1
$params = "-DaggerVersion 0.9.7"
"$script $params" | Invoke-Expression
If I look at the contents at that script:
# param (
# [Parameter(Mandatory)] $PersonalToken
# )
Clear-Host
@"
---------------------------------------------------------------------------------
Author: Alessandro Festa
Dagger Installation Utility for Windows users
---------------------------------------------------------------------------------
"@
# Since we are already authenticated we may directly download latest version.
$name="dagger"
$base="https://dl.dagger.io"
function http_download {
$version=Get_Version
$version=$version -replace '[""]'
$version=$version -replace '\n'
$fileName="dagger_v" + $version + "_windows_amd64"
Clear-Host
$url = $base + "/" + $name + "/releases/" + $version + "/" + $fileName + ".zip"
write-host $url
Pause
Invoke-WebRequest -Uri $url -OutFile $env:temp/$fileName.zip -ErrorAction Stop
Expand-Archive -Path $env:temp/$fileName.zip -DestinationPath $env:HOMEPATH/dagger -Force -ErrorVariable ProcessError;
If ($ProcessError)
{
Clear-Host
@"
Whoops apparently we had an issue in unzipping the file, please check
you have the right permission to do so and try to unzip manually the file.
Currently we saved Dagger at your temp folder.
"@
exit
} else {
Clear-Host
@"
Thank You for downloading Dagger!
-----------------------------------------------------
Dagger has been saved at <YOUR HOME FOLDER>/dagger/
Please add dagger.exe to your PATH in order to use it
----------------------------------------------------
"@
}
}
function Get_Version {
$response = Invoke-RestMethod 'http://releases.dagger.io/dagger/latest_version' -Method 'GET' -Body $body -ErrorAction SilentlyContinue -ErrorVariable DownloadError
If ($DownloadError)
{
Clear-Host
@"
---------------------------------------------------------------------------
Houston we have a problem!
Apparently we had an issue in downloading the file, please try again
run the script and if it still fail please open an issue on the Dagger repo.
----------------------------------------------------------------------------
"@
exit
}
return $response
}
http_download
I don't see a reference to DaggerVersion anywhere, so I'm not sure how this is meant to work - it seems like we always use Get_Version.
Think this is a docs issue, but also, not sure, since this script clearly used to work.
Metadata
Metadata
Assignees
Labels
No labels
Activity
jedevc commentedon Apr 8, 2024
Just some history:
So the
install.ps1script ondl.dagger.iois legacy and hasn't been updated since then! We should update it, which likely involves rewriting it.Just a quick note though - I'm not sure how
install.shends up deployed todagger.io- probably worth investigating this as well.jedevc commentedon Apr 8, 2024
Right I've worked out what happened - when #2903 was merged, the
install.ps1script ondl.dagger.iowas never updated.