From 8513a4e0882fec80f8394797cf4ef4063ee79a0a Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 26 Aug 2019 14:26:23 -0400 Subject: [PATCH] script to build safari appex --- scripts/build-safari-appex.ps1 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 scripts/build-safari-appex.ps1 diff --git a/scripts/build-safari-appex.ps1 b/scripts/build-safari-appex.ps1 new file mode 100644 index 0000000000..49e4be504f --- /dev/null +++ b/scripts/build-safari-appex.ps1 @@ -0,0 +1,26 @@ +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"; + +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