Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class AbstractDistributeTask extends AbstractXcodeTask {
throw new IllegalStateException("package does not exist: " + packageDirectory)
}

Pattern pattern = Pattern.compile(".*" + extension)
Pattern pattern = Pattern.compile(".*\." + extension + "$")
def fileList = packageDirectory.list(
[accept: { d, f -> f ==~ pattern }] as FilenameFilter
).toList()
Expand All @@ -107,6 +107,10 @@ class AbstractDistributeTask extends AbstractXcodeTask {
throw new IllegalStateException("No bundle with extension '" + extension + "' found")
}

if (fileList.size() > 1) {
throw new IllegalStateException("Multiple bundles with extension '" + extension + "' found")
}

return new File(packageDirectory, fileList.get(0))
}

Expand Down