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

Changing build attributes for different environment #639

Closed
jbleuzen opened this issue Aug 3, 2016 · 6 comments · May be fixed by qcif/data-curator#563
Closed

Changing build attributes for different environment #639

jbleuzen opened this issue Aug 3, 2016 · 6 comments · May be fixed by qcif/data-curator#563

Comments

@jbleuzen
Copy link

jbleuzen commented Aug 3, 2016

This is more a question than an issue...

Let say I want to build my app for various environment and change for example based on environment :

  • the name
  • the icon path
  • the appId

Is this possible with electron-builder to change build attributes ? I thought that extraMetadata would overwrite build attributes but it's not the case with my testing...

If this is possible how would you do that ?
Thanks !

@develar
Copy link
Member

develar commented Aug 4, 2016

I thought that extraMetadata would overwrite build attributes but it's not the case with my testing...

Currently it doesn't overwrite. If it will be fixed to overwrite — is it a solution?

@jbleuzen
Copy link
Author

jbleuzen commented Aug 4, 2016

If it overwrites it is a solution thanks !

It will work with this :
npm run dist -- --em.build.mac.icon=./icon_dev.png

@jbleuzen
Copy link
Author

Thanks it's working like a charm…
And thanks a lot for this awesome project 👍

@ir-fuel
Copy link

ir-fuel commented Nov 19, 2016

There is something I don't understand here.
In the docs it says:

Specify the build configuration in the development package.json as follows: ....

So the icon file is in the development package.json

However the --em option docs say:

Inject properties to application package.json

So how can injecting properties in the application package.json override an icon?

@develar
Copy link
Member

develar commented Nov 19, 2016

@ir-fuel Docs is a little bit outdated. --em.build. If property named as build, it will change build configuration. So, for example, you can use --em.build.windows.icon to change icon for windows.

Also, please note — since electron-builder 8 you don't need to use two-package.json structure anymore (#906 (comment)).

@VynnykV
Copy link

VynnykV commented Sep 4, 2022

@ir-fuel Docs is a little bit outdated. --em.build. If property named as build, it will change build configuration. So, for example, you can use --em.build.windows.icon to change icon for windows.

Also, please note — since electron-builder 8 you don't need to use two-package.json structure anymore (#906 (comment)).

Can I do the same with publish provider url? Could you give me an example please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants