mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-06 00:48:08 +02:00
build safari appex script fixes
This commit is contained in:
parent
244b5d258b
commit
4f1dfa1602
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user