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

Add reset and clean for submodules #628

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Compiled index.js
I had to add `"newLine": "LF"` to the tsconfig.json. I also had to discard a change to `module.exports` on line 4232 because I'm pretty sure it had nothing to do with my changes.
  • Loading branch information
AceCoderLaura committed Feb 25, 2022
commit 37332a5498d4939d8481006e4d187a6d31c72411
7 changes: 5 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -7432,12 +7432,15 @@ function getSource(settings) {
core.startGroup('Setting up auth for fetching submodules');
yield authHelper.configureGlobalAuth();
core.endGroup();
// Clean existing submodules
if (settings.clean) {
yield git.submoduleReset(settings.nestedSubmodules);
yield git.submoduleClean(settings.nestedSubmodules);
}
// Checkout submodules
core.startGroup('Fetching submodules');
yield git.submoduleSync(settings.nestedSubmodules);
yield git.submoduleUpdate(settings.fetchDepth, settings.nestedSubmodules);
yield git.submoduleReset(settings.nestedSubmodules);
yield git.submoduleClean(settings.nestedSubmodules);
yield git.submoduleForeach('git config --local gc.auto 0', settings.nestedSubmodules);
core.endGroup();
// Persist credentials