Skip to content

Commit

Permalink
docs(rollup): explain that the stamp variable is magically replaced
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Jun 7, 2021
1 parent 39a4401 commit c1bb8f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/rollup/index.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ function parseStatusFile(p) {
return results;
}
// This undefined variable will be replaced with the full path during the build.
const statuses = parseStatusFile(bazel_version_file);
// Parse the stamp file produced by Bazel from the version control system
let version = '<unknown>';
Expand Down
6 changes: 3 additions & 3 deletions packages/rollup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,6 @@ async function main(args) {
}
}

if (require.main === module) {
main(process.argv.slice(2)).then(r => (process.exitCode = r));
}
if (require.main == module) {
(async () => process.exitCode = await main(process.argv.slice(2)))();
}
1 change: 1 addition & 0 deletions packages/rollup/test/version_stamp/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const DEBUG = process.env['COMPILATION_MODE'] === 'dbg';
// Parse the stamp file produced by Bazel from the version control system
let version = '<unknown>';

// This undefined variable will be replaced with the full path during the build.
const statuses = parseStatusFile(bazel_version_file);
// Don't assume BUILD_SCM_VERSION exists
if (statuses['BUILD_SCM_VERSION']) {
Expand Down

0 comments on commit c1bb8f5

Please sign in to comment.