1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-07-07 12:24:49 +02:00
bitwarden-desktop/scripts/build-safari-appex.ps1

28 lines
725 B
PowerShell
Raw Normal View History

2019-08-26 20:26:23 +02:00
param (
[Parameter(Mandatory=$true)]
[string] $version
)
# Dependencies:
# 1. brew cask install powershell
#
# To run:
# pwsh ./build-safari-appex.ps1 -version 1.41.0
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path;
$rootDir = $dir + "\..";
$distDir = $rootDir + "\dist";
$distSafariDir = $distDir + "\safari";
$distSafariAppex = $distSafariDir + "\src\dist\Safari\build\Release\safari.appex";
$pluginsAppex = $rootDir + "\PlugIns\safari.appex";
2019-08-26 20:27:43 +02:00
New-Item $distSafariDir -ItemType Directory -ea 0
2019-08-26 20:26:23 +02:00
cd $distSafariDir
git clone https://github.com/bitwarden/browser.github
cd browser
git checkout tags/$version
npm i
npm run dist:safari
Copy-Item -Path $distSafariAppex -Destination $pluginsAppex
cd $rootDir