File tree Expand file tree Collapse file tree 3 files changed +19
-15
lines changed
Expand file tree Collapse file tree 3 files changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ matrix:
1919 language : node_js
2020 node_js : " 11"
2121 sudo : true
22+ env :
23+ - BUILD_PREBUILDS="1"
2224 - name : " Linux (glibc) - Node 8"
2325 os : linux
2426 dist : xenial
@@ -64,4 +66,5 @@ matrix:
6466 env :
6567 - CC="gcc-8"
6668 - CXX="g++-8"
67- if : tag IS present
69+ - BUILD_PREBUILDS="1"
70+ if : commit_message =~ /(\[build\])|(\[dev\])/
Original file line number Diff line number Diff line change 11os : Visual Studio 2015
22version : " {build}"
33build : off
4- skip_non_tags : true
54platform : x64
65environment :
76 matrix :
87 - nodejs_version : " 8"
98 - nodejs_version : " 10"
109 - nodejs_version : " 11"
10+ BUILD_PREBUILDS : " 1"
1111install :
1212 - ps : Install-Product node $env:nodejs_version x64
1313 - npm install -g npm@5
1414 - cmd : git submodule update --init --recursive
1515 - npm install
1616test_script :
17- - npm test
17+ - npm test
18+ only_commits :
19+ message : /(\[build\])|(\[dev\])/
Original file line number Diff line number Diff line change @@ -5,20 +5,19 @@ const allVersion = [
55 { r : "electron" , t : "4.2.2" } ,
66 { r : "electron" , t : "5.0.1" } ,
77]
8- const exec = require ( 'child_process' ) . exec
9- const command = "git rev-parse --abbrev-ref HEAD"
10- const spawn = require ( 'child_process' ) . spawn
118const async = require ( 'async' )
12- exec ( command , ( err , stdout ) => {
13- if ( ! err ) {
14- let branch = stdout . replace ( "\n" , "" )
15- if ( branch === "master" ) {
16- startBuild ( )
17- } else {
18- console . log ( `Current Branch is ${ branch } ` ) ;
19- }
9+ if ( process . env . BUILD_PREBUILDS ) {
10+
11+ if ( process . env . TRAVIS_BRANCH === "master" || process . env . APPVEYOR_REPO_BRANCH === "master" ) {
12+ startBuild ( )
13+ } else {
14+ console . log ( `Current Branch is ${ process . env . TRAVIS_BRANCH || process . env . APPVEYOR_REPO_BRANCH } ` ) ;
15+ console . log ( "Skip BUILD Now!" )
2016 }
21- } )
17+ } else {
18+ console . log ( "Current Environment does not have BUILD_PREBUILDS variable." )
19+ console . log ( "Skip BUILD Now!" )
20+ }
2221
2322
2423function startBuild ( ) {
You can’t perform that action at this time.
0 commit comments