Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: intel mac proxy #467

Merged
merged 5 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ import { FusesPlugin } from '@electron-forge/plugin-fuses'
import { FuseV1Options, FuseVersion } from '@electron/fuses'
import { getPlatform, getArch } from './src/utils/electron'

let resources = [
'./resources/' + getPlatform() + '/' + getArch(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use path.join('./resources', getPlatform(), getArch())?

Copy link
Member Author

Choose a reason for hiding this comment

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

makes absolutely more sense :D

]

if (getPlatform() === 'mac') {
resources = [
'./resources/mac/arm64',
'./resources/mac/x86_64',
]
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: I'm not a big fan of reassigning variables, so wanted to suggest an alternative:

function getPlatformSpecificResources() {
  if (getPlatform() === 'mac') {
    return ['./resources/mac/arm64', './resources/mac/x86_64']
  }

  return ['./resources/' + getPlatform() + '/' + getArch()]
}

const config: ForgeConfig = {
  // ...
  extraResource: [
    // ...
    ...getPlatformSpecificResources()
  ]
}


const config: ForgeConfig = {
packagerConfig: {
icon: './resources/icons/logo',
Expand All @@ -20,7 +31,7 @@ const config: ForgeConfig = {
'./resources/splashscreen.html',
'./resources/logo-splashscreen-dark.svg',
'./resources/logo-splashscreen.svg',
'./resources/' + getPlatform() + '/' + getArch(),
...resources,
],
osxSign: {
optionsForFile: () => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "k6-studio",
"productName": "k6 Studio",
"version": "0.12.0",
"version": "0.13.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't seem right 👀

Copy link
Member Author

Choose a reason for hiding this comment

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

this is just for testing and will be reverted before the PR gets merged 🙇

"description": "k6 Studio",
"repository": "github:grafana/k6-studio",
"main": ".vite/build/main.js",
Expand Down
Loading