mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 06:43:35 +00:00
choco pack script with chocolateyinstall updates
This commit is contained in:
@@ -1,8 +1,22 @@
|
||||
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path;
|
||||
$rootDir = $dir + "\..";
|
||||
$distDir = $rootDir + "\dist";
|
||||
$nuspec = $rootDir + "\stores\chocolatey\bitwarden.nuspec";
|
||||
$chocoDir = $rootDir + "\stores\chocolatey";
|
||||
$distChocoDir = $distDir + "\chocolatey";
|
||||
|
||||
if(Test-Path -Path $distChocoDir) {
|
||||
Remove-Item -Recurse -Force $distChocoDir
|
||||
}
|
||||
|
||||
Copy-Item -Path $chocoDir -Destination $distChocoDir –Recurse
|
||||
|
||||
$srcPackage = $rootDir + "\src\package.json";
|
||||
$srcPackageVersion = (Get-Content -Raw -Path $srcPackage | ConvertFrom-Json).version;
|
||||
|
||||
choco pack $nuspec --version $srcPackageVersion --out $distDir
|
||||
$exe = $distDir + "\nsis-web\Bitwarden Installer " + $srcPackageVersion + ".exe";
|
||||
$checksum = checksum -t sha256 $exe
|
||||
$nuspec = $distChocoDir + "\bitwarden.nuspec";
|
||||
$chocoInstall = $distChocoDir + "\tools\chocolateyinstall.ps1";
|
||||
|
||||
(Get-Content $chocoInstall).replace('__version__', $srcPackageVersion).replace('__checksum__', $checksum) | Set-Content $chocoInstall
|
||||
choco pack $nuspec --version $srcPackageVersion --out $distChocoDir
|
||||
|
||||
Reference in New Issue
Block a user