Showing
1 changed file
with
2 additions
and
2 deletions
@@ -47,8 +47,8 @@ class Build { | @@ -47,8 +47,8 @@ class Build { | ||
47 | this._prebuild(); | 47 | this._prebuild(); |
48 | this.startTime = (new Date()).getTime(); | 48 | this.startTime = (new Date()).getTime(); |
49 | return this._cloneCode(this.branch).then(() => { | 49 | return this._cloneCode(this.branch).then(() => { |
50 | - let pkg = require(path.join(self.codePath, 'package.json')); | ||
51 | - // set version | 50 | + let pkg = JSON.parse(fs.readFileSync(path.join(self.codePath, 'package.json'))); |
51 | + | ||
52 | self.version = pkg.version; | 52 | self.version = pkg.version; |
53 | self.pkgName = pkg.name; | 53 | self.pkgName = pkg.name; |
54 | 54 |
-
Please register or login to post a comment