Add Jenkins CI (#1486)
* add jenkins ci file * add try/catch and process.exit
This commit is contained in:
parent
54dc4f94e3
commit
7b7e7eaae2
|
@ -0,0 +1,19 @@
|
|||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'master'
|
||||
}
|
||||
}
|
||||
stages {
|
||||
stage('Install') {
|
||||
steps {
|
||||
sh 'npm install'
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'npm run build:electron'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -33,6 +33,7 @@ async function build() {
|
|||
);
|
||||
|
||||
console.log('Building...');
|
||||
try {
|
||||
await builder.build({
|
||||
mac: shouldBuildOs('mac') ? ['zip', 'dmg'] : undefined,
|
||||
win: shouldBuildOs('windows') ? ['nsis'] : undefined,
|
||||
|
@ -68,6 +69,10 @@ async function build() {
|
|||
});
|
||||
|
||||
console.info(`Electron builds are finished! Available at ${electronBuildsDir}`);
|
||||
} catch(err) {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
build();
|
||||
|
|
Loading…
Reference in New Issue