Skip to content

Commit

Permalink
Make dependencies report tests run on windows by using ! as separator
Browse files Browse the repository at this point in the history
On windows filenames cannot use `:` as a separator, which we use for java notice files.

We settled on using a `!` instead which is compatible.

Fixes elastic#9593
  • Loading branch information
andrewvc committed May 16, 2018
1 parent 5c0b835 commit bd8f80e
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,16 @@ public String noticeSourcePath() {
return "LS_HOME/tools/dependencies-report/src/main/resources/notices/" + noticeFilename();
}

/**
* The name contains colons, which don't work on windows. The compatible name uses `!` which works on multiple platforms
* @return
*/
public String fsCompatibleName() {
return name.replace(":", "!");
}

public String noticeFilename() {
return String.format("%s-%s-NOTICE.txt", name, version != null ? version : "NOVERSION");
return String.format("%s-%s-NOTICE.txt", fsCompatibleName(), version != null ? version : "NOVERSION");
}

public String resourceName() {
Expand Down

0 comments on commit bd8f80e

Please sign in to comment.