mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-24 11:55:50 +01:00
snap update from repo snap
This commit is contained in:
parent
c43db2bc63
commit
a43d73a00f
@ -1,12 +1,28 @@
|
|||||||
# Dependencies:
|
param (
|
||||||
|
[Parameter(Mandatory=$true)]
|
||||||
|
[string] $version
|
||||||
|
)
|
||||||
|
|
||||||
|
# Dependencies:
|
||||||
# 1. Install powershell, ex `sudo apt-get install -y powershell`
|
# 1. Install powershell, ex `sudo apt-get install -y powershell`
|
||||||
#
|
#
|
||||||
# To run:
|
# To run:
|
||||||
# pwsh ./snap-update.ps1
|
# pwsh ./snap-update.ps1 -version 1.5.0
|
||||||
|
|
||||||
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path;
|
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path;
|
||||||
$rootDir = $dir + "/..";
|
$rootDir = $dir + "/..";
|
||||||
$distDir = $rootDir + "/dist";
|
$distDir = $rootDir + "/dist";
|
||||||
$distSnap = $distDir + "/bitwarden*.snap";
|
$distSnapDir = $distDir + "/snap";
|
||||||
|
|
||||||
|
if(Test-Path -Path $distSnapDir) {
|
||||||
|
Remove-Item -Recurse -Force $distSnapDir
|
||||||
|
}
|
||||||
|
New-Item -ItemType directory -Path $distSnapDir | Out-Null
|
||||||
|
|
||||||
|
$snap = "bitwarden_" + $version + "_amd64.snap";
|
||||||
|
$distSnap = $distSnapDir + "/" + $snap;
|
||||||
|
$uri = "https://github.com/bitwarden/desktop/releases/download/v" + $version + "/" + $snap;
|
||||||
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||||
|
Invoke-RestMethod -Uri $uri -OutFile $distSnap
|
||||||
|
|
||||||
snapcraft push $distSnap --release stable
|
snapcraft push $distSnap --release stable
|
||||||
|
Loading…
Reference in New Issue
Block a user