Skip to content

Commit fcdcc6e

Browse files
committed
Refactored AutoUpdaterPoA.ts to include support for macOS by modifying the line that finds the asset for macOS.
1 parent 91a5330 commit fcdcc6e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ jobs:
1515
- name: Check out Git repository
1616
uses: actions/checkout@v1
1717

18+
- name: Setup Python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: '3.x' # or the specific version you need
22+
1823
- name: Install Node.js, NPM and Yarn
1924
uses: actions/setup-node@v1
2025
with:
@@ -38,4 +43,4 @@ jobs:
3843

3944
# If the commit is tagged with a version (e.g. "v1.0.0"),
4045
# release the app after building
41-
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
46+
release: ${{ startsWith(github.ref, 'refs/tags/v') }}

src/main/AutoUpdaterPoA.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ class PoAInstaller extends EventEmitter {
7575
if (isWin) {
7676
asset = assets.find((a) => a.name.includes('win-main') && a.name.includes('exe'));
7777
} else if (process.platform === 'linux') {
78-
asset = assets.find((a) => a.name.includes(`linux-main-${tag_name}`)); // Modified this line
78+
asset = assets.find((a) => a.name.includes('linux-main')); // Modified this line
79+
} else if (process.platform === 'darwin') {
80+
asset = assets.find((a) => a.name.includes('mac-main') && a.name.includes('dmg'));
7981
}
8082

8183
if (!asset) {

0 commit comments

Comments
 (0)