Attempt package manager installation with provided license
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Danny Bessems 2021-07-05 15:52:43 +02:00
parent b041658fbf
commit a3e4fb98eb
2 changed files with 25 additions and 23 deletions

View File

@ -204,30 +204,30 @@ build {
"scripts/Install-WinGet.ps1" "scripts/Install-WinGet.ps1"
] ]
} }
provisioner "powershell" {
inline = [
"winget install mozilla.firefox",
"winget install 7zip.7zip",
"winget install microsoft.dotnetframework"
]
// valid_exit_codes = [0, 3010]
}
// provisioner "powershell" { // provisioner "powershell" {
// inline = [ // inline = [
// "winget install mozilla.firefox", // "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12",
// "winget install 7zip.7zip", // "Invoke-Expression ((New-Object Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"
// "winget install microsoft.dotnetframework"
// ] // ]
// // valid_exit_codes = [0, 3010]
// } // }
provisioner "powershell" { // provisioner "powershell" {
inline = [ // inline = [
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12", // "choco config set --name=limit-output --value=LimitOutput",
"Invoke-Expression ((New-Object Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" // "choco install -y dotnetfx",
] // "choco install -y 7zip.install",
} // "choco install -y sysinternals",
provisioner "powershell" { // "choco install -y firefox"
inline = [ // ]
"choco config set --name=limit-output --value=LimitOutput", // valid_exit_codes = [0, 3010]
"choco install -y dotnetfx", // }
"choco install -y 7zip.install",
"choco install -y sysinternals",
"choco install -y firefox"
]
valid_exit_codes = [0, 3010]
}
provisioner "windows-update" { provisioner "windows-update" {
} }

View File

@ -54,10 +54,12 @@ $AppxDependencies.ShortName | ForEach-Object {
Add-AppxPackage @AddAppxPackageSplat Add-AppxPackage @AddAppxPackageSplat
} }
# Install winget # Install winget
$AddAppxPackageSplat = @{ $AddAppxProvisionedPackageSplat = @{
Path = "$env:temp\winget.msixbundle" Online = $True
PackagePath = "$env:temp\winget.msixbundle"
LicensePath = "$env:temp\wingetlicense.xml"
} }
Add-AppxPackage @AddAppxPackageSplat Add-AppxProvisionedPackage @AddAppxProvisionedPackageSplat
# Create reparse point # Create reparse point
$SetExecutionAliasSplat = @{ $SetExecutionAliasSplat = @{