The market for CI building electron apps is growing fast and you guys are one of the few people to offer mac environments! It’s currently quite complex to setup, especially since developers are used to adding an appveyor.yml
found online and everything just works for Windows.
I’ve tried to help a couple of people set it up and they’ve struggled at most of the points I did.
For this to work currently, I have two apps configured pointing to the same repository and slightly different workflows for each. I currently have a shared bitrise.yml
in the repository and the two apps call various workflows via bitrise run
. I understand the reasons and pros/cons of putting the config in the repo but many developers balk at the idea of having the build config in two places (or in my case 3 places!).
It would be great to have a basic ubuntu image with more dependencies installed targeting electron so both apps could use the same workflow.
For linux I currently have to install some stuff before:
sudo apt-get install -y gcc-multilib g++-multilib icnsutils graphicsmagick xz-utils libudev-dev
It would also be great if your auto detect tool detected electron app repositories and offered this ubuntu image or a mac one. The detection currently fails and its not too obvious what to do next. The detection could be as simple as checking if package.json.devDependencies.electron
exists.
Hi @timfish,
Great idea, thanks for the #feature-request!
We’d be glad to add auto detection support for Electron apps, but right now we’re a bit occupied with other tasks.
If you can help us a bit that could speed up the process. It’d help a lot if you could share a #how-to about how an Electron app can be configured, with a bitrise.yml
config and inputs to set / things to search for. I shared a bit more about this here, in a similar request: Nativescript Support on bitrise.io
Once we have a #how-to we can help with adding the auto detection code, either guiding you to do it yourself if you have the time, or we can just implement it the way the #how-to describes.
If you have any questions or if we can help with anything just let us know!
P.S.: don’t forget to vote on this #feature-request!
@viktorbenei I’ll see if I can put something together
2 Likes
Hi timfish. I would appreciate any help. Could you maybe point me to an article? That would be great. Thanks a lot in advance
@timfish do you have a bitrise.yml
you could share?
We use electron-builder
. We have the following in our repository:
---
format_version: '2'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: other
workflows:
linux_deps:
steps:
- script:
inputs:
- content: |-
#!/bin/bash
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install -y yarn libgconf-2-4 xvfb gcc-multilib g++-multilib icnsutils graphicsmagick xz-utils libudev-dev
build:
steps:
- nvm:
inputs:
- node_version: '8'
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
yarn versions
yarn install
yarn test
yarn e2e
yarn release
- deploy-to-bitrise-io:
inputs:
- is_enable_public_page: 'false'
- deploy_path: "$BITRISE_SOURCE_DIR/releases/"
linux:
before_run:
- linux_deps
after_run:
- build
mac:
after_run:
- build
Then in bitrise we have two apps configured. Ubuntu and latest Mac. They only differ by which workflow they call:
---
format_version: '2'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: other
trigger_map:
- push_branch: "*"
workflow: primary
- pull_request_source_branch: "*"
workflow: primary
workflows:
primary:
steps:
- activate-ssh-key@3.1.1:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone: {}
- script@1.1.3:
inputs:
- content: |-
#!/bin/bash
bitrise run mac
app:
envs:
- CSC_LINK: MIIYEAIBAzCCF9cGCSqGSIb3DQEHAaCCF8g...