File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,14 @@ function shallowCopy(obj) {
1111}
1212
1313var travis = process . env [ "TRAVIS" ] ;
14+ var buildNumber = process . env [ "TRAVIS_BUILD_NUMBER" ] || process . env [ "BUILD_NUMBER" ] || "non-ci" ;
1415
1516module . exports = function ( grunt ) {
1617 grunt . initConfig ( {
1718 copyPackageTo : process . env [ "CopyPackageTo" ] || process . env [ "HOME" ] || "." ,
1819
1920 jobName : travis ? "travis" : ( process . env [ "JOB_NAME" ] || "local" ) ,
20- buildNumber : process . env [ "TRAVIS_BUILD_NUMBER" ] || process . env [ "BUILD_NUMBER" ] || "non-ci" ,
21+ buildNumber : buildNumber ,
2122 dateString : now . substr ( 0 , now . indexOf ( "T" ) ) ,
2223
2324 pkg : grunt . file . readJSON ( "package.json" ) ,
@@ -106,7 +107,7 @@ module.exports = function(grunt) {
106107
107108 grunt . registerTask ( "set_package_version" , function ( version ) {
108109 var fs = require ( "fs" ) ;
109- var buildVersion = version !== undefined ? version : process . env [ "BUILD_NUMBER" ] ;
110+ var buildVersion = version !== undefined ? version : buildNumber ;
110111 if ( process . env [ "BUILD_CAUSE_GHPRBCAUSE" ] ) {
111112 buildVersion = "PR" + buildVersion ;
112113 }
You can’t perform that action at this time.
0 commit comments