1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-24 11:55:50 +01:00

build safari appex script fixes

This commit is contained in:
Kyle Spearrin 2019-08-26 15:24:25 -04:00
parent 244b5d258b
commit 4f1dfa1602

View File

@ -1,5 +1,4 @@
param (
[Parameter(Mandatory=$true)]
[string] $version
)
@ -13,14 +12,27 @@ $dir = Split-Path -Parent $MyInvocation.MyCommand.Path;
$rootDir = $dir + "\..";
$distDir = $rootDir + "\dist";
$distSafariDir = $distDir + "\safari";
$distSafariAppex = $distSafariDir + "\src\dist\Safari\build\Release\safari.appex";
$distSafariAppex = $distSafariDir + "\browser\dist\Safari\build\Release\safari.appex";
$pluginsAppex = $rootDir + "\PlugIns\safari.appex";
if(Test-Path -Path $distSafariDir) {
Remove-Item -Recurse -Force $distSafariDir
}
if(Test-Path -Path $pluginsAppex) {
Remove-Item -Recurse -Force $pluginsAppex
}
New-Item $distSafariDir -ItemType Directory -ea 0
cd $distSafariDir
git clone https://github.com/bitwarden/browser.github
git clone git@github.com:bitwarden/browser.git
cd browser
git checkout tags/$version
if (-not ([string]::IsNullOrEmpty($version))) {
$tag = "v" + $version
git checkout tags/$tag
}
npm i
npm run dist:safari
Copy-Item -Path $distSafariAppex -Destination $pluginsAppex