1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 02:03:39 +00:00

upadte release scripts

This commit is contained in:
Kyle Spearrin
2018-06-04 15:36:56 -04:00
parent d12b2397da
commit db66d26287
2 changed files with 3 additions and 0 deletions

32
scripts/choco-update.ps1 Normal file
View File

@@ -0,0 +1,32 @@
# To run:
# .\choco-pack.ps1
#
# and then push to choco with:
# cd ..\dist\chocolatey
# choco push
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path;
$rootDir = $dir + "\..";
$distDir = $rootDir + "\dist";
$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;
$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
cd $distChocoDir
choco push
cd $rootDir