1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 06:13:38 +00:00

artifacts and stuff

This commit is contained in:
Kyle Spearrin
2020-09-24 12:17:41 -04:00
parent 696856a3c9
commit 30e898b697
4 changed files with 89 additions and 49 deletions

View File

@@ -3,7 +3,8 @@
[switch] $mas,
[switch] $masdev,
[switch] $skipcheckout,
[switch] $skipoutcopy
[switch] $skipoutcopy,
[switch] $copyonly
)
# Dependencies:
@@ -21,10 +22,27 @@ $distSafariAppexMas = $distSafariDir + "\browser\dist\Safari\mas\build\Release\s
$distSafariAppexMasDev = $distSafariDir + "\browser\dist\Safari\masdev\build\Release\safari.appex";
$pluginsAppex = $rootDir + "\PlugIns\safari.appex";
function CopyOutput {
if ($mas) {
Copy-Item -Path $distSafariAppexMas -Destination $pluginsAppex Recurse
}
elseif ($masdev) {
Copy-Item -Path $distSafariAppexMasDev -Destination $pluginsAppex Recurse
}
else {
Copy-Item -Path $distSafariAppexDmg -Destination $pluginsAppex Recurse
}
}
if (Test-Path -Path $pluginsAppex) {
Remove-Item -Recurse -Force $pluginsAppex
}
if ($copyonly) {
CopyOutput
exit
}
if(-not $skipcheckout) {
if (Test-Path -Path $distSafariDir) {
Remove-Item -Recurse -Force $distSafariDir
@@ -49,15 +67,7 @@ npm i
npm run dist:safari
if (-not $skipoutcopy) {
if ($mas) {
Copy-Item -Path $distSafariAppexMas -Destination $pluginsAppex Recurse
}
elseif ($masdev) {
Copy-Item -Path $distSafariAppexMasDev -Destination $pluginsAppex Recurse
}
else {
Copy-Item -Path $distSafariAppexDmg -Destination $pluginsAppex Recurse
}
CopyOutput
}
cd $rootDir