1
0
mirror of https://github.com/bitwarden/browser synced 2024-12-20 22:47:26 +01:00
bitwarden-estensione-browser/apps/cli/scripts/snap-build.ps1

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
807 B
PowerShell
Raw Normal View History

2018-07-27 15:22:55 +02:00
param (
[Parameter(Mandatory=$true)]
[string] $version
)
# Dependencies:
2018-07-27 15:05:16 +02:00
# 1. Install powershell, ex `sudo apt-get install -y powershell`
#
# To run:
2018-07-27 15:22:55 +02:00
# ./snap-build.ps1 -version 1.1.0
2018-05-25 20:51:30 +02:00
#
# and then push to snap with:
# cd ../dist/snap
# snap push bw*.snap
2018-07-27 15:05:16 +02:00
# or, use the ./snap-update.ps1 script
2018-05-25 20:51:30 +02:00
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path
$rootDir = $dir + "/.."
$distDir = $rootDir + "/dist"
$snapDir = $rootDir + "/stores/snap"
$distSnapDir = $distDir + "/snap"
$snapDistYaml = $distSnapDir + "/snapcraft.yaml"
if(Test-Path -Path $distSnapDir) {
Remove-Item -Recurse -Force $distSnapDir
}
Copy-Item -Path $snapDir -Destination $distSnapDir Recurse
2018-07-27 15:22:55 +02:00
(Get-Content $snapDistYaml).replace('__version__', $version) | Set-Content $snapDistYaml
2018-05-25 20:51:30 +02:00
cd $distSnapDir
snapcraft
2019-03-20 19:15:32 +01:00
cd $rootDir