Skip to content

Commit

Permalink
use prebuild script for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendonovich committed Jan 27, 2025
1 parent e59c3be commit 79e16c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/prebuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ rustflags = [
recursive: true,
});

await signMacOSFrameworkLibs(nativeDeps).catch((e) => {
await symlinkSharedLibsMacOS(nativeDeps).catch((e) => {
console.error(`Failed to symlink shared libs.`);
throw e;
});
Expand Down Expand Up @@ -146,7 +146,7 @@ const NATIVE_DEPS_ASSETS = {
},
};

async function signMacOSFrameworkLibs(nativeDeps) {
async function symlinkSharedLibsMacOS(nativeDeps) {
// Framework
const framework = path.join(nativeDeps, "Spacedrive.framework");

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ jobs:
matrix:
settings:
- target: x86_64-apple-darwin
prebuild: x86_64
- target: aarch64-apple-darwin
prebuild: aarch64
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -129,9 +131,6 @@ jobs:
node-version: "20"
cache: pnpm

- name: Setup native dependencies
run: pnpm cap-setup

- name: Install dependencies
run: pnpm install

Expand All @@ -158,6 +157,7 @@ jobs:
working-directory: apps/desktop
run: |
export TARGET_TRIPLE=${{ matrix.settings.target }}
node ${{ github.workspace }}/.github/prebuild.js darwin ${{ matrix.settings.prebuild }}
pnpm tauri build --target ${{ matrix.settings.target }} --config src-tauri/tauri.conf.prod.json
env:
# https://github.com/tauri-apps/tauri-action/issues/740
Expand Down
2 changes: 2 additions & 0 deletions scripts/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ async function main() {
aarch64: "native-deps-aarch64-darwin-apple.tar.xz",
};

await fs.mkdir(targetDir, { recursive: true });

const nativeDepsTar = `${targetDir}/native-deps.tar.xz`;
if (!(await fileExists(nativeDepsTar))) {
const nativeDepsBytes = await fetch(
Expand Down

1 comment on commit 79e16c6

@vercel
Copy link

@vercel vercel bot commented on 79e16c6 Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.