Skip to content

Commit

Permalink
Remove unnecessary CIRCLE_CI_API_TOKEN checks (#26499)
Browse files Browse the repository at this point in the history
Token is not required for GET
  • Loading branch information
mondaychen authored Mar 28, 2023
1 parent 1f5cdf8 commit 5cbe625
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
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

0 comments on commit 5cbe625

Please sign in to comment.