1
0
mirror of https://github.com/bitwarden/browser synced 2025-01-27 03:35:05 +01:00

27 lines
741 B
PowerShell
Raw Normal View History

2018-06-04 16:59:57 -04:00
param (
2018-08-09 10:12:35 -04:00
[Parameter(Mandatory=$true)]
[string] $version
2018-06-04 16:59:57 -04:00
)
# To run:
2018-08-09 10:12:35 -04:00
# .\choco-update.ps1 -version 1.3.0
2018-05-23 14:42:46 -04:00
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path;
$rootDir = $dir + "\..";
$distDir = $rootDir + "\dist";
$distChocoDir = $distDir + "\chocolatey";
if(Test-Path -Path $distChocoDir) {
Remove-Item -Recurse -Force $distChocoDir
}
2018-08-09 10:12:35 -04:00
New-Item -ItemType directory -Path $distChocoDir | Out-Null
2018-05-23 14:42:46 -04:00
2018-08-09 10:12:35 -04:00
$nupkg = "bitwarden-cli." + $version + ".nupkg"
$uri = "https://github.com/bitwarden/cli/releases/download/v" + $version + "/" + $nupkg;
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-RestMethod -Uri $uri -OutFile $($distChocoDir + "\" + $nupkg)
2018-05-23 14:42:46 -04:00
2018-08-09 10:12:35 -04:00
cd $distChocoDir
choco push
cd $rootDir