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

Include all changed files after the re-run of wrapper task. #237

Merged
merged 1 commit into from
Jun 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 4 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1035,13 +1035,16 @@ class MainAction {
yield updater.update();
core.endGroup();
core.startGroup('Checking whether any file has been updated');
const modifiedFiles = yield git.gitDiffNameOnly();
let modifiedFiles = yield git.gitDiffNameOnly();
core.debug(`Modified files count: ${modifiedFiles.length}`);
core.debug(`Modified files list: ${modifiedFiles}`);
core.endGroup();
if (modifiedFiles.length) {
core.startGroup('Updating Wrapper (2nd update)');
yield updater.update();
modifiedFiles = yield git.gitDiffNameOnly();
core.debug(`Modified files count: ${modifiedFiles.length}`);
core.debug(`Modified files list: ${modifiedFiles}`);
core.endGroup();
core.startGroup('Verifying Wrapper');
yield updater.verify();
Expand Down
5 changes: 4 additions & 1 deletion src/tasks/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class MainAction {
core.endGroup();

core.startGroup('Checking whether any file has been updated');
const modifiedFiles = await git.gitDiffNameOnly();
let modifiedFiles = await git.gitDiffNameOnly();
core.debug(`Modified files count: ${modifiedFiles.length}`);
core.debug(`Modified files list: ${modifiedFiles}`);
core.endGroup();
Expand All @@ -145,6 +145,9 @@ export class MainAction {
// https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:upgrading_wrapper
core.startGroup('Updating Wrapper (2nd update)');
await updater.update();
modifiedFiles = await git.gitDiffNameOnly();
core.debug(`Modified files count: ${modifiedFiles.length}`);
core.debug(`Modified files list: ${modifiedFiles}`);
core.endGroup();

core.startGroup('Verifying Wrapper');
Expand Down