Skip to content

Commit

Permalink
build: fix zone.js version stamping after updating to new rollup_bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed Nov 14, 2019
1 parent 6667ffa commit 0b5cfb7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
15 changes: 14 additions & 1 deletion packages/zone.js/rollup-es5.config.js
@@ -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
*/`;
Expand Down
15 changes: 14 additions & 1 deletion packages/zone.js/rollup-es5_global-es2015.config.js
@@ -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
*/`;
Expand Down

0 comments on commit 0b5cfb7

Please sign in to comment.