angular-cn/aio/scripts
George Kalpakas 2021ad12cf ci(docs-infra): skip deploying RC version when lexicographically smaller than stable (#37426)
The angular.io production deployment script (`deploy-to-firebase.sh`)
compares the major version corresponding to the current branch (e.g.
`8` for branch `8.1.x`) against the major stable version (e.g. `9` if
the current stable version is `9.1.0`). It then uses the result of that
comparison to determine whether the current branch corresponds to a
newer version than stable (i.e. an RC version) and thus should not be
deployed or to an older version and thus may need to be deployed to an
archive vX.angular.io project.

Previously, the script was using string comparison (`<`) to compare the
two major versions. This could produce incorrect results for an RC major
version that is numerically greater than the stable but
lexicographically smaller. For example, 10 vs 9 (10 is numerically
greater but lexicographically smaller than 9).
Example of a CI job that incorrectly tried to deploy an RC branch to
production: https://circleci.com/gh/angular/angular/726414

This commit fixes it by switching to an integer comparison (i.e. using
the `-lt` operator).

PR Close #37426
2020-06-04 09:17:29 -07:00
..
contributors docs(aio): add missing mentors for collaborators (#29142) 2019-04-11 08:06:18 -07:00
audit-web-app.js build: several minor fixes related to using `puppeteer` (#35381) 2020-02-18 12:42:47 -08:00
build-404-page.js refactor: remove unused parameter in _main method invocation (#28203) 2019-01-23 10:58:38 -08:00
build-artifacts.sh ci(docs-infra): reduce verbosity of `yarn build` on CI (#26746) 2018-10-25 21:17:52 -04:00
check-environment.js build(aio): do not fail if `check-env` for the main angular project fails 2017-06-16 07:51:18 +01:00
create-preview.js ci(docs-infra): manually trigger the preview server webhook (#27458) 2018-12-04 13:59:54 -08:00
deploy-to-firebase.sh ci(docs-infra): skip deploying RC version when lexicographically smaller than stable (#37426) 2020-06-04 09:17:29 -07:00
deploy-to-firebase.test.sh ci(docs-infra): move deployment to CircleCI (#26377) 2018-10-23 14:35:38 -07:00
payload.sh ci: migrate payload size tracking goldens to the golden directory (#36455) 2020-04-24 09:05:11 -07:00
switch-to-viewengine.js build(docs-infra): align config with what cli generates for new apps (#32923) 2019-10-04 08:27:21 -07:00
test-aio-a11y.js fix(docs-infra): fix API list search color and styles (#31272) 2019-07-12 17:55:02 -04:00
test-preview.js test(docs-infra): run basic smoke tests against PR previews (#26649) 2018-10-29 13:00:20 -04:00
test-production.sh ci(docs-infra): ignore node version in `aio_monitoring_stable` CI job (for real) (#35033) 2020-01-29 09:25:46 -08:00