build: fix zone.js version stamping after updating to new rollup_bundle (#33329)
PR Close #33329
This commit is contained in:
parent
7f2885ec7d
commit
9d21065e25
@ -1,8 +1,21 @@
|
|||||||
const node = require('rollup-plugin-node-resolve');
|
const node = require('rollup-plugin-node-resolve');
|
||||||
const commonjs = require('rollup-plugin-commonjs');
|
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 = `/**
|
const banner = `/**
|
||||||
* @license Angular v0.0.0-PLACEHOLDER
|
* @license Angular v${version}
|
||||||
* (c) 2010-2019 Google LLC. https://angular.io/
|
* (c) 2010-2019 Google LLC. https://angular.io/
|
||||||
* License: MIT
|
* License: MIT
|
||||||
*/`;
|
*/`;
|
||||||
|
@ -1,8 +1,21 @@
|
|||||||
const node = require('rollup-plugin-node-resolve');
|
const node = require('rollup-plugin-node-resolve');
|
||||||
const commonjs = require('rollup-plugin-commonjs');
|
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 = `/**
|
const banner = `/**
|
||||||
* @license Angular v0.0.0-PLACEHOLDER
|
* @license Angular v${version}
|
||||||
* (c) 2010-2019 Google LLC. https://angular.io/
|
* (c) 2010-2019 Google LLC. https://angular.io/
|
||||||
* License: MIT
|
* License: MIT
|
||||||
*/`;
|
*/`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user