Skip to content
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

Remove unnecessary CIRCLE_CI_API_TOKEN checks #26499

Merged
merged 1 commit into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/react-devtools-inline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,6 @@ yarn
./download-experimental-build.js --commit=main
```

Please note that you might need to [create a Circle CI API Token](https://circleci.com/docs/2.0/managing-api-tokens/) and set up an environment variable `CIRCLE_CI_API_TOKEN`.

## Build steps
Once the above packages have been built or downloaded, you can watch for changes made to the source code and automatically rebuild by running:
```sh
Expand Down
8 changes: 1 addition & 7 deletions scripts/release/shared-commands/download-build-artifacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,9 @@ const run = async ({build, cwd, releaseChannel}) => {
}

// Download and extract artifact
const {CIRCLE_CI_API_TOKEN} = process.env;
if (CIRCLE_CI_API_TOKEN == null) {
throw new Error(
`Expected a CircleCI token to download artifacts, got ${CIRCLE_CI_API_TOKEN}`
);
}
await exec(`rm -rf ./build`, {cwd});
await exec(
`curl -L $(fwdproxy-config curl) ${buildArtifacts.url} -H "Circle-Token: ${CIRCLE_CI_API_TOKEN}" | tar -xvz`,
`curl -L $(fwdproxy-config curl) ${buildArtifacts.url} | tar -xvz`,
{
cwd,
}
Expand Down
12 changes: 1 addition & 11 deletions scripts/release/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,8 @@ const extractCommitFromVersionNumber = version => {
};

const getArtifactsList = async buildID => {
const {CIRCLE_CI_API_TOKEN} = process.env;
if (CIRCLE_CI_API_TOKEN == null) {
throw new Error(
`Expected a CircleCI token to download artifacts, got ${CIRCLE_CI_API_TOKEN}`
);
}
const jobArtifactsURL = `https://circleci.com/api/v1.1/project/github/facebook/react/${buildID}/artifacts`;
const jobArtifacts = await fetch(jobArtifactsURL, {
headers: {
'Circle-Token': CIRCLE_CI_API_TOKEN,
},
});
const jobArtifacts = await fetch(jobArtifactsURL);
return jobArtifacts.json();
};

Expand Down