mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
Add NuGet.exe on Windows Server 2016/2019 (#1049)
* Add NuGet.CommandLine * remove temporary path update
This commit is contained in:
committed by
GitHub
parent
4bc0c4348d
commit
ebadb5cea8
@@ -193,6 +193,12 @@
|
|||||||
"elevated_user": "{{user `install_user`}}",
|
"elevated_user": "{{user `install_user`}}",
|
||||||
"elevated_password": "{{user `install_password`}}"
|
"elevated_password": "{{user `install_password`}}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"scripts":[
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-Nuget.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "windows-restart",
|
"type": "windows-restart",
|
||||||
"restart_timeout": "30m"
|
"restart_timeout": "30m"
|
||||||
|
|||||||
@@ -193,6 +193,12 @@
|
|||||||
"elevated_user": "{{user `install_user`}}",
|
"elevated_user": "{{user `install_user`}}",
|
||||||
"elevated_password": "{{user `install_password`}}"
|
"elevated_password": "{{user `install_password`}}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"scripts":[
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-Nuget.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
|
|||||||
16
images/win/scripts/Installers/Install-Nuget.ps1
Normal file
16
images/win/scripts/Installers/Install-Nuget.ps1
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
################################################################################
|
||||||
|
## File: Install-Nuget.ps1
|
||||||
|
## Desc: Install NuGet.CommandLine
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
Choco-Install -PackageName NuGet.CommandLine
|
||||||
|
|
||||||
|
if (Get-Command -Name 'nuget.exe')
|
||||||
|
{
|
||||||
|
Write-Host 'nuget on path'
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Write-Host 'nuget is not on path'
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
@@ -127,6 +127,10 @@ function Get-ComposerVersion {
|
|||||||
return "Composer $composerVersion"
|
return "Composer $composerVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-NugetVersion {
|
||||||
|
(nuget help) -match "NuGet Version" -replace "Version: "
|
||||||
|
}
|
||||||
|
|
||||||
function Get-AntVersion {
|
function Get-AntVersion {
|
||||||
($(ant -version) | Out-String) -match "version (?<version>\d+\.\d+\.\d+)" | Out-Null
|
($(ant -version) | Out-String) -match "version (?<version>\d+\.\d+\.\d+)" | Out-Null
|
||||||
$antVersion = $Matches.Version
|
$antVersion = $Matches.Version
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ $markdown += New-MDList -Style Unordered -Lines @(
|
|||||||
(Get-CondaVersion),
|
(Get-CondaVersion),
|
||||||
(Get-RubyGemsVersion),
|
(Get-RubyGemsVersion),
|
||||||
(Get-HelmVersion),
|
(Get-HelmVersion),
|
||||||
(Get-ComposerVersion)
|
(Get-ComposerVersion),
|
||||||
|
(Get-NugetVersion)
|
||||||
)
|
)
|
||||||
|
|
||||||
$markdown += New-MDHeader "Project Management" -Level 3
|
$markdown += New-MDHeader "Project Management" -Level 3
|
||||||
|
|||||||
Reference in New Issue
Block a user