Skip to content

Commit 5989f9a

Browse files
committed
Update __tests__, dist, dummy-module, and src to
support multi-module Maven projects Updated buildinfo by removing file location from outputs
1 parent 4e571f7 commit 5989f9a

6 files changed

Lines changed: 31 additions & 6 deletions

File tree

__tests__/buildinfo.test.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,17 @@ outputs.0.checksums.sha512=cbd2e4dc6ddd5590ecf4d7aec5a5a368121e21494611c6b808146
3232
outputs.1.groupId=org.sentrysoftware
3333
outputs.1.filename=dummy-module-1.0.00.txt
3434
outputs.1.length=22
35-
outputs.1.checksums.sha512=7b69215e1fc256d55f7a4cbb7daf5ca0cf63358a3d2bf85bb12f954646502afaef074f1d517184cf4e42271f4965f651850c76c1b6c90ff79f09a778e8c93a3d`;
35+
outputs.1.checksums.sha512=7b69215e1fc256d55f7a4cbb7daf5ca0cf63358a3d2bf85bb12f954646502afaef074f1d517184cf4e42271f4965f651850c76c1b6c90ff79f09a778e8c93a3d
36+
37+
outputs.2.groupId=org.sentrysoftware
38+
outputs.2.filename=dummy-sub-module-1.0.00.pom
39+
outputs.2.length=287
40+
outputs.2.checksums.sha512=cbd2e4dc6ddd5590ecf4d7aec5a5a368121e21494611c6b8081461d669e0c9c8e40356bcbdf9f9ce9f4eabe5be0af2f4e93af3301db120e5fa5f7ad9b3ab700f
41+
42+
outputs.3.groupId=org.sentrysoftware
43+
outputs.3.filename=dummy-sub-module-1.0.00.txt
44+
outputs.3.length=22
45+
outputs.3.checksums.sha512=7b69215e1fc256d55f7a4cbb7daf5ca0cf63358a3d2bf85bb12f954646502afaef074f1d517184cf4e42271f4965f651850c76c1b6c90ff79f09a778e8c93a3d`;
3646

3747
jest.mock('fs', () => ({
3848
promises: {

dist/index.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2+
<modelVersion>4.0.0</modelVersion>
3+
4+
<!-- Created to test upload -->
5+
6+
</project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Created to test upload

dummy-module/target/dummy-module.buildinfo

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,14 @@ outputs.0.checksums.sha512=cbd2e4dc6ddd5590ecf4d7aec5a5a368121e21494611c6b808146
2929
outputs.1.groupId=org.sentrysoftware
3030
outputs.1.filename=dummy-module-1.0.00.txt
3131
outputs.1.length=22
32-
outputs.1.checksums.sha512=7b69215e1fc256d55f7a4cbb7daf5ca0cf63358a3d2bf85bb12f954646502afaef074f1d517184cf4e42271f4965f651850c76c1b6c90ff79f09a778e8c93a3d
32+
outputs.1.checksums.sha512=7b69215e1fc256d55f7a4cbb7daf5ca0cf63358a3d2bf85bb12f954646502afaef074f1d517184cf4e42271f4965f651850c76c1b6c90ff79f09a778e8c93a3d
33+
34+
outputs.2.groupId=org.sentrysoftware
35+
outputs.2.filename=dummy-sub-module-1.0.00.pom
36+
outputs.2.length=287
37+
outputs.2.checksums.sha512=cbd2e4dc6ddd5590ecf4d7aec5a5a368121e21494611c6b8081461d669e0c9c8e40356bcbdf9f9ce9f4eabe5be0af2f4e93af3301db120e5fa5f7ad9b3ab700f
38+
39+
outputs.3.groupId=org.sentrysoftware
40+
outputs.3.filename=dummy-sub-module-1.0.00.txt
41+
outputs.3.length=22
42+
outputs.3.checksums.sha512=7b69215e1fc256d55f7a4cbb7daf5ca0cf63358a3d2bf85bb12f954646502afaef074f1d517184cf4e42271f4965f651850c76c1b6c90ff79f09a778e8c93a3d

src/buildinfo.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ function readBuildInfoFile(filePath) {
2121
lines.forEach(line => {
2222
if (line.startsWith('outputs') && line.includes('filename=')) {
2323
const outputFileName = line.split('=')[1];
24-
const outputFilePath = join(location, outputFileName);
2524
if (!outputFileName.includes('.pom')) {
26-
outputs.push(outputFilePath);
25+
outputs.push(outputFileName);
2726
}
2827
}
2928
});

0 commit comments

Comments
 (0)