diff --git a/scripts/cloud_funcs/README.md b/scripts/cloud_funcs/README.md index 359f3cc48b5..1b510fdbde4 100644 --- a/scripts/cloud_funcs/README.md +++ b/scripts/cloud_funcs/README.md @@ -1,10 +1,12 @@ This directory contains the following Google Cloud Functions. ### `trigger_nightly` -Programatically triggers a Cloud Build on master. This function is called by the Cloud Scheduler around 4am "America/New York" time every day (configurable via the Cloud Scheduler UI). + +Programmatically triggers a Cloud Build on master. This function is called by the Cloud Scheduler around 4am "America/New York" time every day (configurable via the Cloud Scheduler UI). You can also trigger the function manually via the Cloud UI. Command to re-deploy: + ```sh gcloud functions deploy nightly_tfjs \ --runtime nodejs14 \ @@ -15,6 +17,7 @@ If a build was triggered by nightly, there is a substitution variable `_NIGHTLY= You can forward the substitution as the `NIGHTLY` environment variable so the scripts can use it, by specifying `env: ['NIGHTLY=$_NIGHTLY']` in `cloudbuild.yml`. E.g. `integration_tests/benchmarks/benchmark_cloud.sh` uses the `NIGHTLY` bit to always run on nightly. ### `send_email` + Sends an email and a chat message with the nightly build status. Every build sends a message to the `cloud-builds` topic with its build information. The `send_email` function is subscribed to that topic and ignores all builds (e.g. builds triggered by pull requests) **except** for the nightly build and sends an email to an internal mailing list with its build status around 4:40am. Command to re-deploy: @@ -28,6 +31,7 @@ gcloud functions deploy send_email \ ``` ### `sync_reactnative` + Makes a request to browserStack to sync the current build of the tfjs-react-native integration app to browserstack. The app itself is stored in a GCP bucket. This needs to be done at least once every 30 days and is triggered via cloud scheduler via the `sync_reactnative` topic. Currently set to run weekly on Thursdays at 3AM. @@ -44,7 +48,7 @@ gcloud functions deploy sync_reactnative \ The pipeline looks like this: -1) At 4am, Cloud Scheduler writes to `nightly_tfjs` topic -2) That triggers the `nightly_tfjs` function, which starts a build programatically -3) That build runs and writes its status to `cloud-builds` topic -4) That triggers the `send_email` function, which sends email and chat with the build status. +1. At 4am, Cloud Scheduler writes to `nightly_tfjs` topic +2. That triggers the `nightly_tfjs` function, which starts a build programmatically +3. That build runs and writes its status to `cloud-builds` topic +4. That triggers the `send_email` function, which sends email and chat with the build status. diff --git a/scripts/generate_cloudbuild.ts b/scripts/generate_cloudbuild.ts index d9450cf8bfb..0bce012deff 100644 --- a/scripts/generate_cloudbuild.ts +++ b/scripts/generate_cloudbuild.ts @@ -33,7 +33,7 @@ interface CloudbuildStep { const CUSTOM_PROPS = new Set(['nightlyOnly', 'waitedForByPackages']); interface CustomCloudbuildStep extends CloudbuildStep { nightlyOnly?: boolean; // Only run during nightly tests - waitedForByPackages?: boolean; // Other non-bazel pacakges `waitFor` this step + waitedForByPackages?: boolean; // Other non-bazel packages `waitFor` this step } function removeCustomProps(step: CustomCloudbuildStep): CloudbuildStep { diff --git a/scripts/make-version.js b/scripts/make-version.js index 77ac3458ec5..91766146849 100755 --- a/scripts/make-version.js +++ b/scripts/make-version.js @@ -43,7 +43,7 @@ fs.writeFile(path.join(dirName, 'src/version.ts'), versionCode, err => { if (err) { throw new Error(`Could not save version file ${version}: ${err}`); } - console.log(`Version file for version ${version} saved sucessfully.`); + console.log(`Version file for version ${version} saved successfully.`); }); if (dirName === 'tfjs-converter') { @@ -60,7 +60,7 @@ version = '${version}' throw new Error(`Could not save pip version file ${version}: ${err}`); } console.log( - `Version file for pip version ${version} saved sucessfully.`); + `Version file for pip version ${version} saved successfully.`); }); const buildFilename = path.join(dirName, '/python/BUILD.bazel'); @@ -74,6 +74,6 @@ version = '${version}' fs.writeFileSync(buildFilename, newValue, 'utf-8'); console.log( - `pip version ${version} for BUILD.bazel file is updated sucessfully.`); + `pip version ${version} for BUILD.bazel file is updated successfully.`); }); } diff --git a/scripts/publish-npm.ts b/scripts/publish-npm.ts index d62f78b0029..4aaa696c5a8 100755 --- a/scripts/publish-npm.ts +++ b/scripts/publish-npm.ts @@ -77,7 +77,7 @@ function setDifference(a: Set, b: Set): Set { const parser = new argparse.ArgumentParser(); parser.addArgument('--git-protocol', { action: 'storeTrue', - help: 'Use the git protocal rather than the http protocol when cloning repos.' + help: 'Use the git protocol rather than the http protocol when cloning repos.' }); parser.addArgument('--registry', { diff --git a/scripts/release-tfjs.ts b/scripts/release-tfjs.ts index c4c37251f33..7975501b1fe 100644 --- a/scripts/release-tfjs.ts +++ b/scripts/release-tfjs.ts @@ -225,7 +225,7 @@ async function main() { fs.writeFileSync(packageJsonPath, pkg); // Update dependency versions of all package.json files found in the - // package to use the new verison numbers (except ones in node_modules). + // package to use the new version numbers (except ones in node_modules). const subpackages = $(`find ${ packagePath} -name package.json -not -path \'*/node_modules/*\'`) @@ -289,7 +289,7 @@ async function main() { 'YARN_REGISTRY="https://registry.npmjs.org/" yarn publish-npm ' + 'after you merge the PR.' + 'Remember to delete the dev branch once PR is merged.' + - 'Please remeber to update the website once you have released ' + + 'Please remember to update the website once you have released ' + 'a new package version.'); if (args.dry) { diff --git a/scripts/release-util.ts b/scripts/release-util.ts index 5e6107fb260..9e03078063e 100755 --- a/scripts/release-util.ts +++ b/scripts/release-util.ts @@ -415,7 +415,7 @@ export async function getReleaseBranch(name: string): Promise { Array.from(branchesStr.split(/\n/)).map(line => line.toString().trim()); // Find the latest matching branch, e.g. tfjs_1.7.1 - // It will not match temprary generated branches such as tfjs_1.7.1_phase0. + // It will not match temporary generated branches such as tfjs_1.7.1_phase0. const exp = '^' + name + '_([^_]+)$'; const regObj = new RegExp(exp); const maybeBranch = branches.find(branch => branch.match(regObj)); diff --git a/scripts/release.ts b/scripts/release.ts index c0aa9e8fb22..0644db310a0 100644 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -38,7 +38,7 @@ const parser = new argparse.ArgumentParser(); parser.addArgument('--git-protocol', { action: 'storeTrue', - help: 'Use the git protocal rather than the http protocol when cloning repos.' + help: 'Use the git protocol rather than the http protocol when cloning repos.' }); async function main() { @@ -174,7 +174,7 @@ async function main() { `Please publish by running ` + `YARN_REGISTRY="https://registry.npmjs.org/" yarn publish-npm ` + `after you merge the PR.` + - `Please remeber to update the website once you have released ` + + `Please remember to update the website once you have released ` + 'a new package version'); process.exit(0); diff --git a/scripts/start_local_debugger_server.js b/scripts/start_local_debugger_server.js index 17ad7c9ab06..1f0c6e05753 100644 --- a/scripts/start_local_debugger_server.js +++ b/scripts/start_local_debugger_server.js @@ -118,7 +118,7 @@ parser.addArgument('--port', { }); parser.addArgument('--version', { - help: `The verison of the bundle. Default: ${DEFAULT_VERSION}`, + help: `The version of the bundle. Default: ${DEFAULT_VERSION}`, defaultValue: DEFAULT_VERSION, type: 'string', });