mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-22 16:29:09 +01:00
snap build script
This commit is contained in:
parent
c57156ecfd
commit
85211e05ab
25
scripts/snap-build.ps1
Normal file
25
scripts/snap-build.ps1
Normal file
@ -0,0 +1,25 @@
|
||||
# To run:
|
||||
# ./snap-build.ps1
|
||||
#
|
||||
# and then push to snap with:
|
||||
# cd ../dist/snap
|
||||
# snap push bw*.snap
|
||||
|
||||
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$rootDir = $dir + "/.."
|
||||
$distDir = $rootDir + "/dist"
|
||||
$snapDir = $rootDir + "/stores/snap"
|
||||
$distSnapDir = $distDir + "/snap"
|
||||
$snapYaml = $snapDir + "/snapcraft.yaml"
|
||||
$snapDistYaml = $distSnapDir + "/snapcraft.yaml"
|
||||
$srcPackage = $rootDir + "/package.json"
|
||||
$srcPackageVersion = (Get-Content -Raw -Path $srcPackage | ConvertFrom-Json).version
|
||||
|
||||
if(Test-Path -Path $distSnapDir) {
|
||||
Remove-Item -Recurse -Force $distSnapDir
|
||||
}
|
||||
|
||||
Copy-Item -Path $snapDir -Destination $distSnapDir –Recurse
|
||||
(Get-Content $snapDistYaml).replace('__version__', $srcPackageVersion) | Set-Content $snapDistYaml
|
||||
cd $distSnapDir
|
||||
snapcraft
|
@ -1,5 +1,5 @@
|
||||
name: bw
|
||||
version: 1.0.0
|
||||
version: __version__
|
||||
summary: Bitwarden CLI
|
||||
description: A secure and free password manager for all of your devices.
|
||||
confinement: strict
|
||||
|
Loading…
Reference in New Issue
Block a user