Skip to content

Commit 3809747

Browse files
committed
fix(ng-dev): use an environment variable to determine local builds
Instead of trying to determine whether the version of ng-dev mismatches two strings that will be stamped, we now use a local environment variable to set the local build status.
1 parent 1c89160 commit 3809747

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ng-dev/utils/version-check.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function ngDevVersionMiddleware() {
4040
export async function verifyNgDevToolIsUpToDate(workspacePath: string): Promise<boolean> {
4141
// The placeholder will be replaced by the `pkg_npm` substitutions.
4242
const localVersion = `0.0.0-{SCM_HEAD_SHA}`;
43-
if (localVersion === ('0.0.0-{{BUILD_SCM_COMMIT_SHA}}' as string)) {
43+
if (!!process.env['LOCAL_NG_DEV_BUILD']) {
4444
Log.debug('Skipping ng-dev version check as this is a locally generated version.');
4545
return true;
4646
}

tools/local-dev.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ bazelCommand=${BAZEL:-"pnpm bazel"}
1919

2020
# Execute the built ng-dev command in the current working directory
2121
# and pass-through arguments unmodified.
22-
${ngDevBinFile} ${@}
22+
LOCAL_NG_DEV_BUILD=1 ${ngDevBinFile} ${@}

0 commit comments

Comments
 (0)