Skip to content

Commit

Permalink
fixing mac install for UI (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
tee8z authored Dec 27, 2024
1 parent 1018fdd commit 3cbd356
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion doppler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "doppler"
version = "0.3.5"
version = "0.3.6"
repository = "https://github.com/tee8z/doppler.git"

[package.metadata.dist]
Expand Down
18 changes: 11 additions & 7 deletions doppler_ui/dist.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//used in build process please do not touch
const { bin } = require('./package.json');
const execSync = require('child_process').execSync;
const os = require('os');
const path = require('path');
const fs = require('fs');
const crypto = require('crypto');
Expand Down Expand Up @@ -53,14 +54,17 @@ if (!bunTarget) {
throw `To the best of our knowledge, bun does not support building for ${distTarget}`;
}
const binExt = distTarget.includes('windows') ? '.exe' : '';
const isDarwin = distTarget.includes('apple-darwin');
// Existing build process...
const isDarwin = process.platform === 'darwin';

if (isDarwin) {
console.log('Darwin detected. Installing @rollup/rollup-darwin-x64...');
execSync('npm install @rollup/rollup-darwin-x64', { stdio: 'inherit' });
console.log('Removing old installed dependencies ...');
execSync('rm package-lock.json', { stdio: 'inherit' });
execSync('rm -rf node_modules', { stdio: 'inherit' });
console.log('Darwin platform detected. Installing required dependencies...');
try {
console.log('Installing @rollup/rollup-darwin-x64...');
execSync('npm install --save @rollup/rollup-darwin-x64', { stdio: 'inherit' });
} catch (error) {
console.error('Error during Darwin setup:', error);
process.exit(1);
}
}

// Setup npm
Expand Down

0 comments on commit 3cbd356

Please sign in to comment.