Skip to content

Commit eb1af1e

Browse files
dgp1130atscott
authored andcommitted
refactor(devtools): remove --config snapshot-build and leave a note for Firefox (angular#55717)
We removed display of the Git SHA in Angular DevTools in angular#55694, so there is no longer a need to stamp release builds in Chrome or Firefox. I opted to leave a `--config snapshot-build-firefox` option as a no-op which a reader could follow to a comment explaining exactly _why_ we can't stamp Firefox releases. This should hopefully make it less likely that we forget and attempt to re-add this feature in the future only to encounter the same release problems. PR Close angular#55717
1 parent b9c88dc commit eb1af1e

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.bazelrc

+7
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ build:release --stamp
6060
build:snapshot-build --workspace_status_command="yarn -s ng-dev release build-env-stamp --mode=snapshot"
6161
build:snapshot-build --stamp
6262

63+
# Angular DevTools for Firefox releases *cannot* be stamped and `--config snapshot-build-firefox` is a no-op.
64+
# This is because Mozilla requires add-on source code to be uploaded and then they manually reproduce the build.
65+
# If we stamp the build based on Git information such as the current commit, then reproducing the build would require
66+
# uploading the entire `.git` directory. We already must upload the entire monorepo, and uploading `.git` as well
67+
# exceeds the max source file size. To address this, we just *don't* stamp Firefox builds of Angular DevTools.
68+
build:snapshot-build-firefox --nostamp
69+
6370
##########################################################
6471
# AIO architect build configuration #
6572
# See aio/angular.json for available configurations. #

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
"check-tooling-setup": "yarn tsc --project .ng-dev/tsconfig.json && yarn tsc --project scripts/tsconfig.json",
4141
"devtools:devserver": "ibazel run //devtools/src:devserver",
4242
"devtools:devserver:demo-standalone": "ibazel run //devtools/projects/demo-standalone/src:devserver",
43-
"devtools:build:chrome": "bazelisk build --config snapshot-build --//devtools/projects/shell-browser/src:flag_browser=chrome -- devtools/projects/shell-browser/src:prodapp",
44-
"devtools:build:firefox": "bazelisk build --config snapshot-build --//devtools/projects/shell-browser/src:flag_browser=firefox -- devtools/projects/shell-browser/src:prodapp",
45-
"devtools:test": "bazelisk test --config snapshot-build --//devtools/projects/shell-browser/src:flag_browser=chrome -- //devtools/...",
43+
"devtools:build:chrome": "bazelisk build --//devtools/projects/shell-browser/src:flag_browser=chrome -- devtools/projects/shell-browser/src:prodapp",
44+
"devtools:build:firefox": "bazelisk build --config snapshot-build-firefox --//devtools/projects/shell-browser/src:flag_browser=firefox -- devtools/projects/shell-browser/src:prodapp",
45+
"devtools:test": "bazelisk test --//devtools/projects/shell-browser/src:flag_browser=chrome -- //devtools/...",
4646
"docs": "[[ -n $CI ]] && echo 'Cannot run this yarn script on CI' && exit 1 || yarn bazel run //adev:serve --fast_adev",
4747
"docs:build": "[[ -n $CI ]] && echo 'Cannot run this yarn script on CI' && exit 1 || yarn bazel build //adev:build --fast_adev",
4848
"benchmarks": "tsx --tsconfig=scripts/tsconfig.json scripts/benchmarks/index.mts"

0 commit comments

Comments
 (0)