From 460e6aee16247c99be8784ca2b6580f4e71573bb Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 14 Mar 2024 15:26:21 +0000 Subject: [PATCH] build: remove validate-build-files script Since we exclusively build with Bazel now, this check is unnecessary. --- scripts/validate-build-files.mts | 34 -------------------------------- scripts/validate.mts | 5 ----- 2 files changed, 39 deletions(-) delete mode 100644 scripts/validate-build-files.mts diff --git a/scripts/validate-build-files.mts b/scripts/validate-build-files.mts deleted file mode 100644 index 09d0a06b76..0000000000 --- a/scripts/validate-build-files.mts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { existsSync } from 'fs'; -import { join } from 'path'; -import { releasePackages } from './packages.mjs'; - -export default async function (_options: {}) { - let error = false; - - for (const pkg of releasePackages) { - // There should be at least one BUILD file next to each package.json. - if (!existsSync(join(pkg.root, 'BUILD')) && !existsSync(join(pkg.root, 'BUILD.bazel'))) { - console.error( - `The package ${JSON.stringify(pkg.name)} does not have a BUILD file associated to it.\n` + - 'You must either set an exception or make sure it can be built using Bazel.', - ); - error = true; - } - } - - // TODO: enable this to break - if (error) { - // process.exit(1); - console.warn('Found some BUILD files missing, which will be breaking your PR soon.'); - } - - return 0; -} diff --git a/scripts/validate.mts b/scripts/validate.mts index d31d447d27..a0191a4aa2 100644 --- a/scripts/validate.mts +++ b/scripts/validate.mts @@ -8,7 +8,6 @@ import { execSync } from 'child_process'; import templates from './templates.mjs'; -import validateBuildFiles from './validate-build-files.mjs'; import validateLicenses from './validate-licenses.mjs'; import validateUserAnalytics from './validate-user-analytics.mjs'; @@ -39,10 +38,6 @@ export default async function (options: { verbose: boolean }) { console.info('Running license validation...'); error = (await validateLicenses({})) != 0 || error; - console.info(''); - console.info('Running BUILD files validation...'); - error = (await validateBuildFiles({})) != 0 || error; - console.info(''); console.info('Running User Analytics validation...'); error = (await validateUserAnalytics({})) != 0 || error;