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

Catch up latest docs: from 5.1 to 5.4 #215

Merged
merged 2 commits into from
Dec 9, 2023
Merged

Conversation

BlueCutOfficial
Copy link
Member

This is an automatic catch up PR to align our non-translated documentation with the latest official documentation.

@BlueCutOfficial BlueCutOfficial force-pushed the catchup-5.4 branch 2 times, most recently from aa7d5d3 to 65619d3 Compare December 8, 2023 14:47
\`\`\`diff
${diffblock}
\`\`\`
`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`,
`,

});

// Create a directory to put the children diff
fs.mkdirSync('scripts/patches');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid issues if the dir already exists you can set recursive option:

Suggested change
fs.mkdirSync('scripts/patches');
fs.mkdirSync('scripts/patches', { recursive: true });

}
console.log('shelljs: "git push origin -f ref-upstream" executed');

if (shell.exec('git switch master').code !== 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about a shell/exec function like this and use it everywhere:

function shellexec(command){
  if (shell.exec(command).code !== 0) {
    throw new Error(`shelljs: "${command}" command failed`);
  }
  console.log(`shelljs: "${command}" executed`);
}


if (!issuePostingError) {
// Once the issues are posted, delete patches folder and files
fs.rmSync('scripts/patches', { recursive: true, force: true });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be better with a main try/catch and then do the rmSync in the finally

@BlueCutOfficial BlueCutOfficial mentioned this pull request Dec 9, 2023
4 tasks
@BlueCutOfficial BlueCutOfficial merged commit 7d2bec1 into master Dec 9, 2023
2 checks passed
@BlueCutOfficial BlueCutOfficial deleted the catchup-5.4 branch December 9, 2023 09:24
@BlueCutOfficial
Copy link
Member Author

=> #220

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants