@@ -62,9 +62,10 @@ module.exports = {
6262 * This path should either be absolute or relative to the project root.
6363 * @param {boolean } enableIvy True, if Ivy should be used.
6464 * @param {string } description Human-readable description of the build.
65+ * @param {boolean? } isRelease True, if the build should be stamped for a release.
6566 * @returns {Array<{name: string, outputPath: string} } A list of packages built.
6667 */
67- function buildTargetPackages ( destPath , enableIvy , description ) {
68+ function buildTargetPackages ( destPath , enableIvy , description , isRelease = false ) {
6869 console . info ( '##################################' ) ;
6970 console . info ( `${ scriptPath } :` ) ;
7071 console . info ( ' Building @angular/* npm packages' ) ;
@@ -80,9 +81,10 @@ function buildTargetPackages(destPath, enableIvy, description) {
8081 bazelCmd } query --output=label "attr('tags', '\\[.*release-with-framework.*\\]', //packages/...) intersect kind('ng_package|pkg_npm', //packages/...)"`;
8182 const targets = exec ( getTargetsCmd , true ) . split ( / \r ? \n / ) ;
8283
83- // Use `--config=release` so that snapshot builds get published with embedded version info.
84- exec ( `${ bazelCmd } build --config=release --config=${ enableIvy ? 'ivy' : 'view-engine' } ${
85- targets . join ( ' ' ) } `) ;
84+ // Use either `--config=snapshot` or `--config=release` so that builds are created with the
85+ // correct embedded version info.
86+ exec ( `${ bazelCmd } build --config=${ isRelease ? 'release' : 'snapshot' } --config=${
87+ enableIvy ? 'ivy' : 'view-engine' } ${ targets . join ( ' ' ) } `) ;
8688
8789 // Create the output directory.
8890 const absDestPath = resolve ( baseDir , destPath ) ;
0 commit comments