mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
Move CLI to apps/cli
This commit is contained in:
32
apps/cli/scripts/snap-build.ps1
Normal file
32
apps/cli/scripts/snap-build.ps1
Normal file
@@ -0,0 +1,32 @@
|
||||
param (
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string] $version
|
||||
)
|
||||
|
||||
# Dependencies:
|
||||
# 1. Install powershell, ex `sudo apt-get install -y powershell`
|
||||
#
|
||||
# To run:
|
||||
# ./snap-build.ps1 -version 1.1.0
|
||||
#
|
||||
# and then push to snap with:
|
||||
# cd ../dist/snap
|
||||
# snap push bw*.snap
|
||||
# or, use the ./snap-update.ps1 script
|
||||
|
||||
$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
|
||||
(Get-Content $snapDistYaml).replace('__version__', $version) | Set-Content $snapDistYaml
|
||||
cd $distSnapDir
|
||||
snapcraft
|
||||
cd $rootDir
|
||||
Reference in New Issue
Block a user