-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: ensure angular version placeholder is up-to-date when staging release #17465
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: ensure angular version placeholder is up-to-date when staging release #17465
Conversation
…release Ensures that the Angular version placeholder is properly updated when staging the release. We perform this as part of the staging script, since changes between staging and publishing are *not* expected and this is enforced by the publish script. Additionally, the rules are very strict. If something ever changes due to unknown reasons, the peer dependency checks needs to be disabled manually / or updated.
} | ||
|
||
const configFileContent = readFileSync(bzlConfigPath, 'utf8'); | ||
const matches = configFileContent.match(/ANGULAR_PACKAGE_VERSION = ["']([^"']+)/); |
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.
I do not know of a better way to get the version placeholder from the Bazel .bzl
file.
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.
You could make a nodejs_binary
that takes in the version placeholder as an argument and writes it to stdout or a genrule
that outputs the placeholder to a file.
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.
Yeah, that's what we are doing for the rollup globals check (the genrule). Though it would complicate things if a file needs to be built by Bazel whenever the staging script runs. i.e. would we just spawn a process to build it?
The nodejs
binary one is more interesting, but unfortunately it would complicate things too. If you remember, we used Bazel initially for the release scripts, but the scripts ran in the Bazel bin directory..
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.
For the genrule, yeah, that's what I had in mind (spawn a child process).
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.
Yeah, that would work. I don't mind much either. Happy to do the genrule if you slightly prefer it more than the other options. I'm somehow preferring the current one since we basically just need static analysis and actually building seems unnecessary. It's a more robust idea though.
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
I don't feel super strongly about the bzl thing
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. |
Ensures that the Angular version placeholder is properly updated when
staging the release. We perform this as part of the staging script,
since changes between staging and publishing are not expected
and this is enforced by the publish script.
Additionally, the rules are very strict. If something ever changes
due to unknown reasons, the peer dependency checks needs to be
disabled manually / or updated.