Delete unused Circle CI scripts. (#22710)
Esteban committed
Nov 6, 2021 at 15:16 UTC
327d5c48454aaee0d78fa69b7ef96a14605bf93b
9 files changed
-171
scripts/circleci/add_build_info_json.sh
deleted
-5
@@ -1,5 +0,0 @@
1
-#!/bin/bash
2
-
3
-set -e
4
-
5
-node ./scripts/release/ci-add-build-info-json.js
scripts/circleci/bench.sh
deleted
-5
@@ -1,5 +0,0 @@
1
-#!/bin/bash
2
-
3
-set -e
4
-
5
-npm run bench
\ No newline at end of file
scripts/circleci/check_minified_errors.sh
deleted
-14
@@ -1,14 +0,0 @@
1
-#!/bin/bash
2
-
3
-# Ensure errors are minified in production
4
-
5
-OUT=$(git --no-pager grep -n --untracked --no-exclude-standard 'FIXME (minify-errors-in-prod)' -- './build/*')
6
-
7
-if [ "$OUT" != "" ]; then
8
- echo "$OUT";
9
- echo -e "\n";
10
- echo "Detected an unminified error message in the production build. User-facing errors message must have a corresponding error code in scripts/error-codes/codes.json."
11
- exit 1
12
-fi
13
-
14
-exit 0
scripts/circleci/pack_and_store_artifact.sh
deleted
-15
@@ -1,15 +0,0 @@
1
-#!/bin/bash
2
-
3
-set -e
4
-
5
-# Compress build directory into a single tarball for easy download
6
-tar -zcvf ./build.tgz ./build
7
-
8
-# NPM pack all modules to ensure we archive the correct set of files
9
-cd ./build/node_modules
10
-for dir in ./* ; do
11
- npm pack "$dir"
12
-done
13
-
14
-# Compress packed modules into a single tarball for easy download by the publish script
15
-tar -zcvf ../../node_modules.tgz ./*.tgz
scripts/circleci/set_up_github_keys.sh
deleted
-12
@@ -1,12 +0,0 @@
1
-#!/bin/bash
2
-
3
-set -e
4
-
5
-if [ -n "$GITHUB_TOKEN" ]; then
6
-
7
- GH_PAGES_DIR=$(pwd)/../react-gh-pages
8
- echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" >~/.netrc
9
- git config --global user.name "Circle CI"
10
- git config --global user.email "circle@reactjs.org"
11
-
12
-fi
scripts/circleci/test_coverage.sh
deleted
-11
@@ -1,11 +0,0 @@
1
-#!/bin/bash
2
-
3
-set -e
4
-
5
-yarn test --coverage --maxWorkers=2
6
-if [ -z "$CI_PULL_REQUEST" ]; then
7
- ./node_modules/.bin/coveralls < ./coverage/lcov.info
8
-fi
9
-
10
-# TODO: should we also track prod code coverage somehow?
11
-# yarn test-prod --coverage
scripts/circleci/update_package_versions.sh
deleted
-5
@@ -1,5 +0,0 @@
1
-#!/bin/bash
2
-
3
-set -e
4
-
5
-node ./scripts/release/ci-update-package-versions.js
scripts/release/ci-add-build-info-json.js
deleted
-73
@@ -1,73 +0,0 @@
1
-#!/usr/bin/env node
2
-
3
-'use strict';
4
-
5
-// This script is run by Circle CI (see ../scripts/circleci).
6
-// It is not meant to be run as part of the local build or publish process.
7
-// It exists to share code between the Node release scripts and CI bash scripts.
8
-
9
-// IMPORTANT:
10
-// Changes below should be mirrored in ./build-release-locally-commands/add-build-info-json.js
11
-
12
-const {exec} = require('child_process');
13
-const {existsSync} = require('fs');
14
-const {join} = require('path');
15
-
16
-const run = async () => {
17
- const {writeJson, readJson} = require('fs-extra');
18
- const {getBuildInfo, getPublicPackages} = require('./utils');
19
-
20
- const cwd = join(__dirname, '..', '..');
21
-
22
- const {
23
- branch,
24
- buildNumber,
25
- checksum,
26
- commit,
27
- reactVersion,
28
- } = await getBuildInfo();
29
-
30
- const isExperimental = process.env.RELEASE_CHANNEL === 'experimental';
31
- const packages = getPublicPackages(isExperimental);
32
- const packagesDir = join(cwd, 'packages');
33
-
34
- const buildInfoJSON = {
35
- branch,
36
- buildNumber,
37
- checksum,
38
- commit,
39
- environment: 'ci',
40
- reactVersion,
41
- };
42
-
43
- for (let i = 0; i < packages.length; i++) {
44
- const packageName = packages[i];
45
- const packagePath = join(packagesDir, packageName);
46
- const packageJSON = await readJson(join(packagePath, 'package.json'));
47
-
48
- // Verify all public packages include "build-info.json" in the files array.
49
- if (!packageJSON.files.includes('build-info.json')) {
50
- console.error(
51
- `${packageName} must include "build-info.json" in files array.`
52
- );
53
- process.exit(1);
54
- }
55
-
56
- // Add build info JSON to package.
57
- if (existsSync(join(packagePath, 'npm'))) {
58
- const buildInfoJSONPath = join(packagePath, 'npm', 'build-info.json');
59
- await writeJson(buildInfoJSONPath, buildInfoJSON, {spaces: 2});
60
- }
61
- }
62
-};
63
-
64
-// Install (or update) release script dependencies before proceeding.
65
-// This needs to be done before we require() the first NPM module.
66
-exec('yarn install', {cwd: __dirname}, (error, stdout, stderr) => {
67
- if (error) {
68
- console.error(error);
69
- process.exit(1);
70
- } else {
71
- run();
72
- }
73
-});
scripts/release/ci-update-package-versions.js
deleted
-31
@@ -1,31 +0,0 @@
1
-#!/usr/bin/env node
2
-
3
-'use strict';
4
-
5
-// This script is run by Circle CI (see ../scripts/circleci).
6
-// It is not meant to be run as part of the local build or publish process.
7
-// It exists to share code between the Node release scripts and CI bash scripts.
8
-
9
-const {exec} = require('child_process');
10
-const {join} = require('path');
11
-
12
-const run = async () => {
13
- const {getBuildInfo, updateVersionsForNext} = require('./utils');
14
-
15
- const cwd = join(__dirname, '..', '..');
16
-
17
- const {reactVersion, version} = await getBuildInfo();
18
-
19
- await updateVersionsForNext(cwd, reactVersion, version);
20
-};
21
-
22
-// Install (or update) release script dependencies before proceeding.
23
-// This needs to be done before we require() the first NPM module.
24
-exec('yarn install', {cwd: __dirname}, (error, stdout, stderr) => {
25
- if (error) {
26
- console.error(error);
27
- process.exit(1);
28
- } else {
29
- run();
30
- }
31
-});