mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-10 09:49:53 +01:00
checkout safari via github action
This commit is contained in:
parent
1009b3b055
commit
109cab2fb7
8
.github/scripts/macos/clean-safari.ps1
vendored
Normal file
8
.github/scripts/macos/clean-safari.ps1
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
$rootPath = $env:GITHUB_WORKSPACE;
|
||||||
|
$distDir = $rootPath + "\dist";
|
||||||
|
$distSafariDir = $distDir + "\safari";
|
||||||
|
|
||||||
|
if (Test-Path -Path $distSafariDir) {
|
||||||
|
Remove-Item -Recurse -Force $distSafariDir
|
||||||
|
}
|
||||||
|
New-Item $distSafariDir -ItemType Directory -ea 0
|
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@ -150,9 +150,19 @@ jobs:
|
|||||||
- name: Run linter
|
- name: Run linter
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
|
||||||
|
- name: Clean safari directory
|
||||||
|
shell: pwsh
|
||||||
|
run: ./scripts/clean-safari.ps1
|
||||||
|
|
||||||
|
- name: Checkout browser extension
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: 'bitwarden/browser'
|
||||||
|
path: 'dist/safari'
|
||||||
|
|
||||||
- name: Build Safari extension for .dmg
|
- name: Build Safari extension for .dmg
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: ./scripts/safari-build.ps1
|
run: ./scripts/safari-build.ps1 -skipcheckout
|
||||||
|
|
||||||
- name: Build application for .dmg
|
- name: Build application for .dmg
|
||||||
run: npm run dist:mac
|
run: npm run dist:mac
|
||||||
@ -162,7 +172,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Safari extension for App Store
|
- name: Build Safari extension for App Store
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: ./scripts/safari-build.ps1 -mas
|
run: ./scripts/safari-build.ps1 -mas -skipcheckout
|
||||||
|
|
||||||
- name: Build application for App Store
|
- name: Build application for App Store
|
||||||
run: npm run dist:mac:mas
|
run: npm run dist:mac:mas
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
param (
|
param (
|
||||||
[string] $version,
|
[string] $version,
|
||||||
[switch] $mas,
|
[switch] $mas,
|
||||||
[switch] $masdev
|
[switch] $masdev,
|
||||||
|
[switch] $skipcheckout
|
||||||
)
|
)
|
||||||
|
|
||||||
# Dependencies:
|
# Dependencies:
|
||||||
@ -19,18 +20,19 @@ $distSafariAppexMas = $distSafariDir + "\browser\dist\Safari\mas\build\Release\s
|
|||||||
$distSafariAppexMasDev = $distSafariDir + "\browser\dist\Safari\masdev\build\Release\safari.appex";
|
$distSafariAppexMasDev = $distSafariDir + "\browser\dist\Safari\masdev\build\Release\safari.appex";
|
||||||
$pluginsAppex = $rootDir + "\PlugIns\safari.appex";
|
$pluginsAppex = $rootDir + "\PlugIns\safari.appex";
|
||||||
|
|
||||||
if (Test-Path -Path $distSafariDir) {
|
|
||||||
Remove-Item -Recurse -Force $distSafariDir
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Test-Path -Path $pluginsAppex) {
|
if (Test-Path -Path $pluginsAppex) {
|
||||||
Remove-Item -Recurse -Force $pluginsAppex
|
Remove-Item -Recurse -Force $pluginsAppex
|
||||||
}
|
}
|
||||||
|
|
||||||
New-Item $distSafariDir -ItemType Directory -ea 0
|
if(-not $skipcheckout) {
|
||||||
cd $distSafariDir
|
if (Test-Path -Path $distSafariDir) {
|
||||||
git clone git@github.com:bitwarden/browser.git
|
Remove-Item -Recurse -Force $distSafariDir
|
||||||
cd browser
|
}
|
||||||
|
New-Item $distSafariDir -ItemType Directory -ea 0
|
||||||
|
cd $distSafariDir
|
||||||
|
git clone git@github.com:bitwarden/browser.git
|
||||||
|
cd browser
|
||||||
|
}
|
||||||
|
|
||||||
if (-not ([string]::IsNullOrEmpty($version))) {
|
if (-not ([string]::IsNullOrEmpty($version))) {
|
||||||
$tag = "v" + $version
|
$tag = "v" + $version
|
||||||
|
Loading…
Reference in New Issue
Block a user