-
Notifications
You must be signed in to change notification settings - Fork 579
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'chore/electron-33' of https://github.com/meetfranz/franz …
…into chore/electron-33
- Loading branch information
Showing
43 changed files
with
3,950 additions
and
1,385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ name: Build/release | |
on: push | ||
|
||
env: | ||
APPLEID: ${{ secrets.APPLEID }} | ||
APPLEIDPASS: ${{ secrets.APPLEIDPASS }} | ||
APPLE_ID: ${{ secrets.APPLEID }} | ||
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLEIDPASS }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} | ||
|
||
|
@@ -23,6 +23,7 @@ jobs: | |
out/*.mac.zip.blockmap | ||
out/latest-mac.yml | ||
CSC_LINK: CSC_LINK_MAC | ||
APPLE_TEAM_ID: TAC9P63ANZ | ||
|
||
- platform: ubuntu | ||
os: ubuntu-latest | ||
|
@@ -51,6 +52,17 @@ jobs: | |
node-version: 16.14.0 | ||
cache: "npm" | ||
|
||
- name: Set up Python (mac only) | ||
if: matrix.platform == 'mac' | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Upgrade pip and install setuptools/wheel (mac only) | ||
if: matrix.platform == 'mac' | ||
run: | | ||
python3 -m pip install --upgrade pip setuptools wheel | ||
- name: Install dependencies | ||
run: | | ||
npm i -g [email protected] | ||
|
@@ -60,7 +72,7 @@ jobs: | |
run: npm run build | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.platform }} | ||
path: ${{ matrix.artifactPath }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
const os = require('os'); | ||
const fs = require('fs'); | ||
const { execSync } = require('child_process'); | ||
const path = require('path'); | ||
|
||
// Configuration: Array of packages to handle conditionally | ||
const packages = [ | ||
'node-mac-permissions', | ||
// Add more packages here if needed | ||
]; | ||
|
||
|
||
exports.default = function () { | ||
console.log('Checking for macOS dependencies...'); | ||
|
||
const isMac = os.platform() === 'darwin'; | ||
|
||
packages.forEach((packageName) => { | ||
const packagePath = path.join(__dirname, '..', 'node_modules', packageName); | ||
|
||
if (isMac) { | ||
// On macOS, ensure that the package is installed | ||
if (!fs.existsSync(packagePath)) { | ||
console.log(`macOS detected and ${packageName} is not installed. Installing...`); | ||
try { | ||
execSync(`npm install ${packageName}`, { stdio: 'inherit' }); | ||
console.log(`${packageName} installed successfully.`); | ||
} catch (error) { | ||
console.error(`Failed to install ${packageName} on macOS:`, error); | ||
process.exit(1); | ||
} | ||
} else { | ||
console.log(`macOS detected and ${packageName} is already installed. No action needed.`); | ||
} | ||
} else { | ||
// On non-macOS platforms, ensure that the package is not present | ||
if (fs.existsSync(packagePath)) { | ||
console.log(`Non-macOS platform detected and ${packageName} is present. Removing...`); | ||
try { | ||
execSync(`npm uninstall ${packageName}`, { stdio: 'inherit' }); | ||
console.log(`${packageName} removed successfully.`); | ||
} catch (error) { | ||
console.error(`Failed to uninstall ${packageName} on non-mac platform:`, error); | ||
process.exit(1); | ||
} | ||
} else { | ||
console.log(`Non-macOS platform detected and ${packageName} is not installed. No action needed.`); | ||
} | ||
} | ||
}); | ||
|
||
return true; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.