Skip to content
Snippets Groups Projects
Unverified Commit 2e18987d authored by Rhys Arkins's avatar Rhys Arkins Committed by GitHub
Browse files

fix(gradle-wrapper): correct artifact filenames for subdirs (#6491)

parent 7b57c961
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ describe(getName(__filename), () => {
const execSnapshots = mockExecAll(exec);
const res = await dcUpdate.updateArtifacts({
packageFileName: 'gradle-wrapper.properties',
packageFileName: 'gradle/wrapper/gradle-wrapper.properties',
updatedDeps: [],
newPackageFileContent: await readString(
`./expectedFiles/gradle/wrapper/gradle-wrapper.properties`
......
......@@ -95,14 +95,22 @@ export async function updateArtifacts({
);
}
const status = await platform.getRepoStatus();
const artifactFileNames = [
'gradle/wrapper/gradle-wrapper.properties',
'gradle/wrapper/gradle-wrapper.jar',
'gradlew',
'gradlew.bat',
].map(
(filename) =>
packageFileName
.replace('gradle/wrapper/', '')
.replace('gradle-wrapper.properties', '') + filename
);
const updateArtifactsResult = (
await Promise.all(
[
'gradle/wrapper/gradle-wrapper.properties',
'gradle/wrapper/gradle-wrapper.jar',
'gradlew',
'gradlew.bat',
].map(async (fileProjectPath) => addIfUpdated(status, fileProjectPath))
artifactFileNames.map(async (fileProjectPath) =>
addIfUpdated(status, fileProjectPath)
)
)
).filter((e) => e != null);
logger.debug(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment