File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,14 @@ function shallowCopy(obj) {
11
11
}
12
12
13
13
var travis = process . env [ "TRAVIS" ] ;
14
+ var buildNumber = process . env [ "TRAVIS_BUILD_NUMBER" ] || process . env [ "BUILD_NUMBER" ] || "non-ci" ;
14
15
15
16
module . exports = function ( grunt ) {
16
17
grunt . initConfig ( {
17
18
copyPackageTo : process . env [ "CopyPackageTo" ] || process . env [ "HOME" ] || "." ,
18
19
19
20
jobName : travis ? "travis" : ( process . env [ "JOB_NAME" ] || "local" ) ,
20
- buildNumber : process . env [ "TRAVIS_BUILD_NUMBER" ] || process . env [ "BUILD_NUMBER" ] || "non-ci" ,
21
+ buildNumber : buildNumber ,
21
22
dateString : now . substr ( 0 , now . indexOf ( "T" ) ) ,
22
23
23
24
pkg : grunt . file . readJSON ( "package.json" ) ,
@@ -106,7 +107,7 @@ module.exports = function(grunt) {
106
107
107
108
grunt . registerTask ( "set_package_version" , function ( version ) {
108
109
var fs = require ( "fs" ) ;
109
- var buildVersion = version !== undefined ? version : process . env [ "BUILD_NUMBER" ] ;
110
+ var buildVersion = version !== undefined ? version : buildNumber ;
110
111
if ( process . env [ "BUILD_CAUSE_GHPRBCAUSE" ] ) {
111
112
buildVersion = "PR" + buildVersion ;
112
113
}
You can’t perform that action at this time.
0 commit comments