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