mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-29 18:50:00 +08:00
chore: adjust script with check remote
This commit is contained in:
parent
f3386666c7
commit
5910f97b8b
@ -52,12 +52,16 @@ async function checkCommit({ files }) {
|
||||
}
|
||||
|
||||
async function checkRemote() {
|
||||
const { remote } = await git.fetch('origin', 'master');
|
||||
if (remote?.indexOf('ant-design/ant-design') === -1) {
|
||||
console.log(
|
||||
chalk.yellow('😓 Your remote origin is not ant-design/ant-design, did you fork it?'),
|
||||
);
|
||||
exitProcess();
|
||||
try {
|
||||
const { remote } = await git.fetch('origin', 'master');
|
||||
if (remote?.indexOf('ant-design/ant-design') === -1) {
|
||||
console.log(
|
||||
chalk.yellow('😓 Your remote origin is not ant-design/ant-design, did you fork it?'),
|
||||
);
|
||||
exitProcess();
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(chalk.red('🚨 Check remote failed. Skip...'));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user