diff --git a/jenkins/Jenkinsfile.darwin.ci b/jenkins/Jenkinsfile.darwin.ci new file mode 100644 index 00000000..0263233f --- /dev/null +++ b/jenkins/Jenkinsfile.darwin.ci @@ -0,0 +1,19 @@ +pipeline { + agent { + node { + label 'master' + } + } + stages { + stage('Install') { + steps { + sh 'npm install' + } + } + stage('Build') { + steps { + sh 'npm run build:electron' + } + } + } +} \ No newline at end of file diff --git a/webpack_config/buildElectron.js b/webpack_config/buildElectron.js index b9ab4aae..ae259841 100644 --- a/webpack_config/buildElectron.js +++ b/webpack_config/buildElectron.js @@ -33,41 +33,46 @@ async function build() { ); console.log('Building...'); - await builder.build({ - mac: shouldBuildOs('mac') ? ['zip', 'dmg'] : undefined, - win: shouldBuildOs('windows') ? ['nsis'] : undefined, - linux: shouldBuildOs('linux') ? ['AppImage'] : undefined, - x64: true, - ia32: true, - config: { - appId: 'com.github.mycrypto.mycryptohq', - productName: 'MyCrypto', - directories: { - app: jsBuildDir, - output: electronBuildsDir - }, - mac: { - category: 'public.app-category.finance', - icon: path.join(config.path.electron, 'icons/icon.icns'), - compression - }, - win: { - icon: path.join(config.path.electron, 'icons/icon.ico'), - compression - }, - linux: { - category: 'Finance', - icon: path.join(config.path.electron, 'icons/icon.png'), - compression - }, - // IMPORTANT: Prevents from auto publishing to GitHub in CI environments - publish: null, - // IMPORTANT: Prevents extending configs in node_modules - extends: null - } - }); + try { + await builder.build({ + mac: shouldBuildOs('mac') ? ['zip', 'dmg'] : undefined, + win: shouldBuildOs('windows') ? ['nsis'] : undefined, + linux: shouldBuildOs('linux') ? ['AppImage'] : undefined, + x64: true, + ia32: true, + config: { + appId: 'com.github.mycrypto.mycryptohq', + productName: 'MyCrypto', + directories: { + app: jsBuildDir, + output: electronBuildsDir + }, + mac: { + category: 'public.app-category.finance', + icon: path.join(config.path.electron, 'icons/icon.icns'), + compression + }, + win: { + icon: path.join(config.path.electron, 'icons/icon.ico'), + compression + }, + linux: { + category: 'Finance', + icon: path.join(config.path.electron, 'icons/icon.png'), + compression + }, + // IMPORTANT: Prevents from auto publishing to GitHub in CI environments + publish: null, + // IMPORTANT: Prevents extending configs in node_modules + extends: null + } + }); - console.info(`Electron builds are finished! Available at ${electronBuildsDir}`); + console.info(`Electron builds are finished! Available at ${electronBuildsDir}`); + } catch(err) { + console.error(err); + process.exit(1); + } } build();