-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #824 from Ana06/signature-chrome
Add VM-Assert-Signature & use to to add Google Chrome
- Loading branch information
Showing
5 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd"> | ||
<metadata> | ||
<id>googlechrome.vm</id> | ||
<version>0.0.0.20240111</version> | ||
<authors>Google LLC.</authors> | ||
<description>Chrome is a popular web browser.</description> | ||
<dependencies> | ||
<dependency id="common.vm" version="0.0.0.20240111" /> | ||
</dependencies> | ||
</metadata> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
$ErrorActionPreference = 'Stop' | ||
Import-Module vm.common -Force -DisableNameChecking | ||
|
||
try { | ||
# Download the installer | ||
$packageArgs = @{ | ||
packageName = $env:ChocolateyPackageName | ||
file = Join-Path ${Env:TEMP} 'googlechromeinstaller.msi' | ||
url = 'https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise.msi' | ||
url64bit = 'https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise64.msi' | ||
} | ||
$filePath = Get-ChocolateyWebFile @packageArgs | ||
VM-Assert-Path $filePath | ||
VM-Assert-Signature $filePath | ||
|
||
# Install the downloaded installer | ||
$packageArgs = @{ | ||
packageName = $env:ChocolateyPackageName | ||
file = $filePath | ||
fileType = 'MSI' | ||
silentArgs = "/quiet /norestart /l*v `"$($env:TEMP)\$($env:chocolateyPackageName).$($env:chocolateyPackageVersion).MsiInstall.log`"" | ||
} | ||
Install-ChocolateyInstallPackage @packageArgs | ||
} catch { | ||
VM-Write-Log-Exception $_ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters