mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(docs-infra): move deploy-to-firebase.js into a dedicated directory (#43963)
This commit moves the `aio/scripts/deploy-to-firebase.js` script into a new directory, `aio/scripts/deploy-to-firebase/`. This will make it easier to break it up into multiple smaller files to better organize the code (without polluting the `aio/scripts/` directory). PR Close #43963
This commit is contained in:
committed by
Alex Rickabaugh
parent
6b8cdc9339
commit
f8ab6e9eb3
@@ -6,4 +6,4 @@ TODO (gkalpak): Add docs. Mention:
|
||||
Relevant files: `aio/aio-builds-setup/scripts/test.sh`
|
||||
- Deploying from CI.
|
||||
Relevant files: `.circleci/config.yml`, `scripts/ci/deploy.sh`, `aio/scripts/build-artifacts.sh`,
|
||||
`aio/scripts/deploy-to-firebase.js`
|
||||
`aio/scripts/deploy-to-firebase/index.js`
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@
|
||||
"redirects-test": "node tests/deployment/unit/test",
|
||||
"firebase-utils-test": "node tools/firebase-test-utils/test",
|
||||
"tools-lint": "eslint tools/firebase-test-utils && eslint tools/ng-packages-installer",
|
||||
"tools-test": "yarn docs-test && yarn boilerplate:test && jasmine tools/ng-packages-installer/index.spec.js && jasmine scripts/deploy-to-firebase.spec.js && yarn firebase-utils-test",
|
||||
"tools-test": "yarn docs-test && yarn boilerplate:test && jasmine tools/ng-packages-installer/index.spec.js && jasmine scripts/deploy-to-firebase/**/*.spec.js && yarn firebase-utils-test",
|
||||
"preserve-and-sync": "yarn docs",
|
||||
"serve-and-sync": "run-p \"docs-watch --watch-only\" \"start {@}\" --",
|
||||
"boilerplate:add": "node ./tools/examples/example-boilerplate add",
|
||||
|
||||
@@ -244,7 +244,7 @@ function deploy(data) {
|
||||
siteId,
|
||||
} = data;
|
||||
|
||||
cd(`${__dirname}/..`);
|
||||
cd(`${__dirname}/../..`);
|
||||
|
||||
console.log('\n\n\n==== Run pre-deploy actions. ====\n');
|
||||
preDeployActions.forEach(fn => fn(data));
|
||||
+3
-3
@@ -8,7 +8,7 @@ const {
|
||||
computeMajorVersion,
|
||||
getLatestCommit,
|
||||
getMostRecentMinorBranch,
|
||||
} = require('./deploy-to-firebase');
|
||||
} = require('./index');
|
||||
|
||||
|
||||
describe('deploy-to-firebase:', () => {
|
||||
@@ -389,11 +389,11 @@ describe('deploy-to-firebase:', () => {
|
||||
|
||||
it('integration - should run the main script without error', () => {
|
||||
// NOTE:
|
||||
// This test executes a new instance of the `deploy-to-firebase.js` script on a separate process
|
||||
// This test executes a new instance of the `deploy-to-firebase` script on a separate process
|
||||
// and thus does not share the `getRemoteRefs()` cache. To improve stability, we retrieve the
|
||||
// latest commit from master ignoring any cached entries.
|
||||
const latestCommitOnMaster = getLatestCommit('master', {retrieveFromCache: false});
|
||||
const cmd = `"${process.execPath}" "${__dirname}/deploy-to-firebase" --dry-run`;
|
||||
const cmd = `"${process.execPath}" "${__dirname}" --dry-run`;
|
||||
const env = {
|
||||
CI_REPO_OWNER: 'angular',
|
||||
CI_REPO_NAME: 'angular',
|
||||
@@ -2,12 +2,9 @@
|
||||
|
||||
This folder is used for extra files that should be included in deployments to firebase.
|
||||
|
||||
After the AIO application had been built and before it is deployed all files and folders
|
||||
inside the folder with the same name as the current deployment mode (next, stable, archive)
|
||||
will be copied to the `dist` folder.
|
||||
After the AIO application had been built and before it is deployed all files and folders inside the folder with the same name as the current deployment mode (next, stable, archive) will be copied to the `dist` folder.
|
||||
|
||||
See the `scripts/deploy-to-firebase.js` script for more details.
|
||||
See the `scripts/deploy-to-firebase/index.js` script for more details.
|
||||
|
||||
**Note:**
|
||||
The `deploy-to-firebase.js` script always expects there to be a folder for the current deployment
|
||||
mode (even if it is empty).
|
||||
The script always expects there to be a folder for the current deployment mode (even if it is empty).
|
||||
|
||||
Reference in New Issue
Block a user