mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
Remove unnecessary CIRCLE_CI_API_TOKEN checks (#26499)
Token is not required for GET
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user