-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: snapshot builds incorrectly modify semver versions #20053
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: snapshot builds incorrectly modify semver versions #20053
Conversation
bb2093a
to
ef43741
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Just one comment about wording for an error message
An interesting case that came up in v10.0.0 with the docs-content. The snapshot release package and docs-content output had various `@breaking-change` notes in the source code referring to `v10.0.0` as certain changes are planned to be made at that point. The snapshot deploy scripts pick up the version from the package.json file and replace it in the output packages with a more concrete version that includes the SHA. This meant that we accidentally also overwrote versions as in the `@breaking-change` notes (ultimately making it difficult for us to use the latest docs-content for the v10 release as it was incorrect). Example snapshot commit: angular/material2-docs-content@e624c71 We fix this by not including the SHA as part of the deployment, but rather including the SHA when building the NPM packages. At that point, we can safely just replace instances of the `0.0.0-PLACEHOLDER` without having to worry about accidental version overriding. To achieve this, we update our release stamping script to have two modes. i.e. snapshot build mode and release mode. Framework does this by checking the Git tag history but that seems less ideal as it makes the release output building reliant on external factors while our stamping is self-contained within the checked out code revision.
ef43741
to
a558cf1
Compare
An interesting case that came up in v10.0.0 with the docs-content. The snapshot release package and docs-content output had various `@breaking-change` notes in the source code referring to `v10.0.0` as certain changes are planned to be made at that point. The snapshot deploy scripts pick up the version from the package.json file and replace it in the output packages with a more concrete version that includes the SHA. This meant that we accidentally also overwrote versions as in the `@breaking-change` notes (ultimately making it difficult for us to use the latest docs-content for the v10 release as it was incorrect). Example snapshot commit: angular/material2-docs-content@e624c71 We fix this by not including the SHA as part of the deployment, but rather including the SHA when building the NPM packages. At that point, we can safely just replace instances of the `0.0.0-PLACEHOLDER` without having to worry about accidental version overriding. To achieve this, we update our release stamping script to have two modes. i.e. snapshot build mode and release mode. Framework does this by checking the Git tag history but that seems less ideal as it makes the release output building reliant on external factors while our stamping is self-contained within the checked out code revision. (cherry picked from commit 33b31b1)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
An interesting case that came up in v10.0.0 with the docs-content. The
snapshot release package and docs-content output had various
@breaking-change
notes in the source code referring tov10.0.0
ascertain changes are planned to be made at that point.
The snapshot deploy scripts pick up the version from the package.json
file and replace it in the output packages with a more concrete version
that includes the SHA. This meant that we accidentally also overwrote
versions as in the
@breaking-change
notes (ultimately making itdifficult for us to use the latest docs-content for the v10 release as
it was incorrect).
Example snapshot commit: angular/material2-docs-content@e624c71
We fix this by not including the SHA as part of the deployment, but
rather including the SHA when building the NPM packages. At that point,
we can safely just replace instances of the
0.0.0-PLACEHOLDER
withouthaving to worry about accidental version overriding.
To achieve this, we update our release stamping script to have two
modes. i.e. snapshot build mode and release mode. Framework does this
by checking the Git tag history but that seems less ideal as it makes
the release output building reliant on external factors while our
stamping is self-contained within the checked out code revision.