diff --git a/lib/manager/git-submodules/__snapshots__/artifact.spec.ts.snap b/lib/manager/git-submodules/__snapshots__/artifact.spec.ts.snap index e1858ffeaf52ba3a4e7383e0f0b62f8863d68cd1..e501c9277486d585510a0e4d8e80e1fd77b5f4f2 100644 --- a/lib/manager/git-submodules/__snapshots__/artifact.spec.ts.snap +++ b/lib/manager/git-submodules/__snapshots__/artifact.spec.ts.snap @@ -10,3 +10,20 @@ Array [ }, ] `; + +exports[`lib/manager/gitsubmodules/artifacts updateArtifacts() returns two modules 1`] = ` +Array [ + Object { + "file": Object { + "contents": "", + "name": "renovate", + }, + }, + Object { + "file": Object { + "contents": "", + "name": "renovate-pro", + }, + }, +] +`; diff --git a/lib/manager/git-submodules/artifact.spec.ts b/lib/manager/git-submodules/artifact.spec.ts index 75c0d66c4bd1bc49e5b29daf24584fd1f0b7f0f0..45113217b6b1d09fa78f49d3155730fe992087cb 100644 --- a/lib/manager/git-submodules/artifact.spec.ts +++ b/lib/manager/git-submodules/artifact.spec.ts @@ -12,5 +12,15 @@ describe('lib/manager/gitsubmodules/artifacts', () => { }) ).toMatchSnapshot(); }); + it('returns two modules', () => { + expect( + updateArtifacts({ + packageFileName: '', + updatedDeps: ['renovate', 'renovate-pro'], + newPackageFileContent: '', + config: {}, + }) + ).toMatchSnapshot(); + }); }); }); diff --git a/lib/manager/git-submodules/artifacts.ts b/lib/manager/git-submodules/artifacts.ts index cd0f348e3ee6cbdfeef1514fb118edaa5bdb99a3..2f14fce0dacf1565662b4d8f5257bde465084534 100644 --- a/lib/manager/git-submodules/artifacts.ts +++ b/lib/manager/git-submodules/artifacts.ts @@ -1,14 +1,18 @@ +import { logger } from '../../logger'; import { UpdateArtifact, UpdateArtifactsResult } from '../common'; export default function updateArtifacts({ updatedDeps, }: UpdateArtifact): UpdateArtifactsResult[] | null { - return [ - { + const res: UpdateArtifactsResult[] = []; + updatedDeps.forEach((dep) => { + logger.info('Updating submodule ' + dep); + res.push({ file: { - name: updatedDeps[0], + name: dep, contents: '', }, - }, - ]; + }); + }); + return res; }