Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix slash in path for docs #55

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dummy-module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<goal>test-docs-generator</goal>
</goals>
<configuration>
<testsPath>./dummy-module/src/test/java/io/skodjob/</testsPath>
<testsPath>${project.basedir}/src/test/java/io/skodjob/</testsPath>
<docsPath>./docs/actual/option1/</docsPath>
<generateFmf>true</generateFmf>
<generateDirs>true</generateDirs>
Expand All @@ -112,7 +112,7 @@
<goal>test-docs-generator</goal>
</goals>
<configuration>
<testsPath>./dummy-module/src/test/java/io/skodjob/</testsPath>
<testsPath>${project.basedir}/src/test/java/io/skodjob/</testsPath>
<docsPath>./docs/actual/option2/</docsPath>
<generateFmf>true</generateFmf>
<generateDirs>false</generateDirs>
Expand All @@ -125,7 +125,7 @@
<goal>test-docs-generator</goal>
</goals>
<configuration>
<testsPath>./dummy-module/src/test/java/io/skodjob/</testsPath>
<testsPath>${project.basedir}/src/test/java/io/skodjob/</testsPath>
<docsPath>./docs/actual/option3/</docsPath>
<generateFmf>false</generateFmf>
<generateDirs>false</generateDirs>
Expand All @@ -138,7 +138,7 @@
<goal>test-docs-generator</goal>
</goals>
<configuration>
<testsPath>./dummy-module/src/test/java/io/skodjob/</testsPath>
<testsPath>${project.basedir}/src/test/java/io/skodjob/</testsPath>
<docsPath>./docs/actual/option4/</docsPath>
<generateFmf>false</generateFmf>
<generateDirs>true</generateDirs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ public void execute() {
getLog().debug(url.getFile());
}

// Ensure that docsPath ends with /
if (!docsPath.endsWith("/")) {
docsPath += "/";
}

Map<String, String> classes = Utils.getTestClassesWithTheirPath(testsPath, generateDirs);
for (Map.Entry<String, String> entry : classes.entrySet()) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ private static void updateLabelFile(String labelFilePath, String updatedData) {
* @param docsPath path where all test docs are stored
*/
public static void updateLinksInLabels(String docsPath) {
String labelsPath = docsPath + "/" + LABELS;
String labelsPath = docsPath + LABELS;

int numberOfDirs = docsPath.length() - docsPath.replace("/", "").length();
String mdFilesPath = "../".repeat(numberOfDirs);
Expand Down