1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

choco update

This commit is contained in:
Kyle Spearrin
2018-06-04 15:43:42 -04:00
parent fa75a5abf4
commit 32769d932e
2 changed files with 5 additions and 6 deletions

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

@@ -0,0 +1,27 @@
# To run:
# .\choco-update.ps1
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path;
$rootDir = $dir + "\..";
$distDir = $rootDir + "\dist";
$chocoDir = $rootDir + "\stores\chocolatey";
$distChocoDir = $distDir + "\chocolatey";
$distChocoToolsDir = $distDir + "\chocolatey\tools";
if(Test-Path -Path $distChocoDir) {
Remove-Item -Recurse -Force $distChocoDir
}
$exe = $distDir + "\windows\bw.exe";
$license = $rootDir + "\LICENSE.txt";
Copy-Item -Path $chocoDir -Destination $distChocoDir Recurse
Copy-Item $exe -Destination $distChocoToolsDir;
Copy-Item $license -Destination $distChocoToolsDir;
$srcPackage = $rootDir + "\package.json";
$srcPackageVersion = (Get-Content -Raw -Path $srcPackage | ConvertFrom-Json).version;
$nuspec = $distChocoDir + "\bitwarden-cli.nuspec";
choco pack $nuspec --version $srcPackageVersion --out $distChocoDir
cd $distChocoDir
choco push
cd $rootDir