build: fix zone.js version stamping after updating to new rollup_bundle (#33329)

PR Close #33329
This commit is contained in:
Greg Magolan 2019-11-09 02:40:04 -08:00 committed by Alex Rickabaugh
parent 7f2885ec7d
commit 9d21065e25
2 changed files with 28 additions and 2 deletions

View File

@ -1,8 +1,21 @@
const node = require('rollup-plugin-node-resolve');
const commonjs = require('rollup-plugin-commonjs');
// Parse the stamp file produced by Bazel from the version control system
let version = '<unknown>';
if (bazel_stamp_file) {
const versionTag = require('fs')
.readFileSync(bazel_stamp_file, {encoding: 'utf-8'})
.split('\n')
.find(s => s.startsWith('BUILD_SCM_VERSION'));
// Don't assume BUILD_SCM_VERSION exists
if (versionTag) {
version = versionTag.split(' ')[1].trim();
}
}
const banner = `/**
* @license Angular v0.0.0-PLACEHOLDER
* @license Angular v${version}
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/`;

View File

@ -1,8 +1,21 @@
const node = require('rollup-plugin-node-resolve');
const commonjs = require('rollup-plugin-commonjs');
// Parse the stamp file produced by Bazel from the version control system
let version = '<unknown>';
if (bazel_stamp_file) {
const versionTag = require('fs')
.readFileSync(bazel_stamp_file, {encoding: 'utf-8'})
.split('\n')
.find(s => s.startsWith('BUILD_SCM_VERSION'));
// Don't assume BUILD_SCM_VERSION exists
if (versionTag) {
version = versionTag.split(' ')[1].trim();
}
}
const banner = `/**
* @license Angular v0.0.0-PLACEHOLDER
* @license Angular v${version}
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/`;