chore: fix validate release task (#7359)

Updates the `gulp validate-release` task to work with the current package structure.
This commit is contained in:
Paul Gschwendtner
2017-09-29 00:31:55 +02:00
committed by Jeremy Elbourn
parent 807ce38ae4
commit c54b83ba58
+11 -1
View File
@@ -37,7 +37,17 @@ task('validate-release:check-bundles', () => {
/** Task that validates the given release package before releasing. */
function checkReleasePackage(packageName: string): string[] {
const bundlePath = join(releasesDir, packageName, '@angular', `${packageName}.js`);
return glob(join(releasesDir, packageName, 'esm2015/*.js'))
.reduce((failures: string[], bundlePath: string) => {
return failures.concat(checkEs2015ReleaseBundle(packageName, bundlePath));
}, []);
}
/**
* Checks an ES2015 bundle inside of a release package. Secondary entry-point bundles will be
* checked as well.
*/
function checkEs2015ReleaseBundle(packageName: string, bundlePath: string): string[] {
const bundleContent = readFileSync(bundlePath, 'utf8');
let failures: string[] = [];