Skip to content

Commit 57f43e8

Browse files
phodalcursoragent
andcommitted
fix: cross-platform support for shell PATH resolution and build pipeline
- Rewrite shell_env.rs to handle Windows (`;` separator, PATHEXT, Scoop/Chocolatey), Linux (snap, linuxbrew), and macOS (Homebrew) PATH resolution - Replace Unix-only `rm -rf && cp -r` in beforeBuildCommand with cross-platform Node.js script (prepare-frontend.mjs) - Fix build-static.mjs: use fileURLToPath for Windows path compat, remove Unix-style env var prefix - Fix CI artifact naming: add explicit `arch` matrix field to avoid duplicate names for macOS ARM64 vs x64 builds - Change tauri-release trigger from `release` branch to `v*` tags - Remove frontend/ build artifacts from git tracking (already in .gitignore) Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent b322ed1 commit 57f43e8

20 files changed

Lines changed: 228 additions & 470 deletions

.github/workflows/tauri-build.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- 'package.json'
99
- 'next.config.ts'
1010
- 'scripts/build-static.mjs'
11+
- 'scripts/prepare-frontend.mjs'
1112
push:
1213
branches:
1314
- main
@@ -17,6 +18,7 @@ on:
1718
- 'package.json'
1819
- 'next.config.ts'
1920
- 'scripts/build-static.mjs'
21+
- 'scripts/prepare-frontend.mjs'
2022
workflow_dispatch:
2123

2224
jobs:
@@ -27,12 +29,16 @@ jobs:
2729
include:
2830
- platform: 'macos-latest'
2931
args: '--target aarch64-apple-darwin'
32+
arch: 'arm64'
3033
- platform: 'macos-latest'
3134
args: '--target x86_64-apple-darwin'
35+
arch: 'x64'
3236
- platform: 'ubuntu-22.04'
3337
args: ''
38+
arch: 'x64'
3439
- platform: 'windows-latest'
3540
args: ''
41+
arch: 'x64'
3642

3743
runs-on: ${{ matrix.platform }}
3844

@@ -79,7 +85,7 @@ jobs:
7985
- name: Upload artifacts
8086
uses: actions/upload-artifact@v4
8187
with:
82-
name: tauri-build-${{ matrix.platform }}-${{ matrix.args && 'arm64' || 'x64' }}
88+
name: tauri-build-${{ matrix.platform }}-${{ matrix.arch }}
8389
path: |
8490
apps/desktop/src-tauri/target/release/bundle/**/*.dmg
8591
apps/desktop/src-tauri/target/release/bundle/**/*.app

.github/workflows/tauri-release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: 'Tauri Release'
22

33
on:
44
push:
5-
branches:
6-
- release
5+
tags:
6+
- 'v*'
77
workflow_dispatch:
88

99
jobs:
@@ -17,12 +17,16 @@ jobs:
1717
include:
1818
- platform: 'macos-latest'
1919
args: '--target aarch64-apple-darwin'
20+
arch: 'arm64'
2021
- platform: 'macos-latest'
2122
args: '--target x86_64-apple-darwin'
23+
arch: 'x64'
2224
- platform: 'ubuntu-22.04'
2325
args: ''
26+
arch: 'x64'
2427
- platform: 'windows-latest'
2528
args: ''
29+
arch: 'x64'
2630

2731
runs-on: ${{ matrix.platform }}
2832

@@ -64,7 +68,7 @@ jobs:
6468
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6569
with:
6670
projectPath: apps/desktop
67-
tagName: app-v__VERSION__
71+
tagName: v__VERSION__
6872
releaseName: 'Routa Desktop v__VERSION__'
6973
releaseBody: 'See the assets to download and install Routa Desktop.'
7074
releaseDraft: true

apps/desktop/src-tauri/frontend/404.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

apps/desktop/src-tauri/frontend/_next/static/css/d3f166c1d167a055.css

Lines changed: 0 additions & 5 deletions
This file was deleted.
-10.3 KB
Binary file not shown.
-33.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)