Skip to content

Commit

Permalink
Fix polynomial regex (#9)
Browse files Browse the repository at this point in the history
* Fix polynomial regex

* Fix polynomial regex

* Fix polynomial regex

---------

Co-authored-by: Karl DeBisschop <[email protected]>
  • Loading branch information
kdebisschop and Karl DeBisschop authored Jul 24, 2024
1 parent 05cd8f4 commit 0a78931
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/bioraft/rundeck/nexus/BranchOrVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public BranchOrVersion(String path) {
* Anything else is considered to be a branch.
*/
public boolean isVersion() {
return versionOrBranch.matches("^(v|rc)?\\d+[.]\\d+.*");
return versionOrBranch.matches("^(v|rc)?\\d+[.]\\d+?.*+$");
}

/**
Expand Down Expand Up @@ -133,7 +133,7 @@ private String component(String path) {
* string-valued.
*/
private String tag(String path) {
return path.replaceAll("/?[^/]*/", "");
return path.replaceAll("/?[^/]{0,199}/", "");
}

}

0 comments on commit 0a78931

Please sign in to comment.