-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(managers/git-submodules): support updating git-tag versions
- Loading branch information
Showing
8 changed files
with
160 additions
and
8 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
lib/modules/manager/git-submodules/__fixtures__/.gitmodules.8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[submodule "renovate1"] | ||
path = deps/renovate1 | ||
url = https://github.com/renovatebot/renovate.git | ||
branch = v0.0.1 | ||
[submodule "renovate2"] | ||
path = deps/renovate2 | ||
url = https://github.com/renovatebot/renovate.git | ||
branch = 0.0.1 | ||
[submodule "renovate3"] | ||
path = deps/renovate3 | ||
url = https://github.com/renovatebot/renovate.git | ||
branch = not-a-semver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
import { logger } from '../../../logger'; | ||
import { readLocalFile } from '../../../util/fs'; | ||
import type { UpdateArtifact, UpdateArtifactsResult } from '../types'; | ||
|
||
export default function updateArtifacts({ | ||
export default async function updateArtifacts({ | ||
updatedDeps, | ||
}: UpdateArtifact): UpdateArtifactsResult[] | null { | ||
}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> { | ||
const res: UpdateArtifactsResult[] = []; | ||
updatedDeps.forEach((dep) => { | ||
for (const dep of updatedDeps) { | ||
// TODO: types (#22198) | ||
logger.info(`Updating submodule ${dep.depName}`); | ||
res.push({ | ||
file: { type: 'addition', path: dep.depName!, contents: '' }, | ||
}); | ||
}); | ||
if (dep.newValue && dep.currentValue !== dep.newValue) { | ||
res.push({ | ||
file: { | ||
type: 'addition', | ||
path: dep.packageFile!, | ||
contents: await readLocalFile(dep.packageFile!), | ||
}, | ||
}); | ||
} | ||
} | ||
return res; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters