mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* improve * Update scripts/integration-tests/utils/e2e-check.js Co-authored-by: Nicolò Ribaudo <[email protected]> * review * Update scripts/integration-tests/utils/e2e-check.js Co-authored-by: Huáng Jùnliàng <[email protected]> * review * review * Update scripts/integration-tests/utils/e2e-check.js Co-authored-by: Huáng Jùnliàng <[email protected]> Co-authored-by: Nicolò Ribaudo <[email protected]> Co-authored-by: Huáng Jùnliàng <[email protected]>
22 lines
565 B
JavaScript
22 lines
565 B
JavaScript
import fs from "fs";
|
|
|
|
const resp = await fetch(
|
|
"https://raw.githubusercontent.com/babel/babel/main/package.json"
|
|
);
|
|
const mainRepoPackageJson = await resp.json();
|
|
|
|
if (
|
|
mainRepoPackageJson.version !==
|
|
JSON.parse(fs.readFileSync("package.json")).version
|
|
) {
|
|
if (process.env.GITHUB_REPOSITORY === "babel/babel") {
|
|
console.error("The branch is not up to date with main, please rebase");
|
|
process.exitCode = 1;
|
|
} else {
|
|
console.error(
|
|
"The branch is not up to date with main of babel/babel, skipping"
|
|
);
|
|
process.exitCode = 10;
|
|
}
|
|
}
|