Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Commit

Permalink
Merge pull request #15 from palantir/feature/kniktas_correctconvert
Browse files Browse the repository at this point in the history
FlexVersion created wrong and convert all / to -
  • Loading branch information
kostasniktas committed May 19, 2015
2 parents a80d6dd + bcdc23f commit 99e02a6
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ class FlexVersionPlugin implements Plugin<Project> {
} else if (userDomain != null && !userDomain.trim().isEmpty()) {
domain = userDomain.trim();
} else if (headRef.isSymbolic()){
String targetName = headRef.getTarget().getName();
if (targetName.startsWith("refs/heads/")) {
targetName = targetName.substring("refs/heads/".length());
domain = headRef.getTarget().getName();
if (domain.startsWith("refs/heads/")) {
domain = domain.substring("refs/heads/".length());
}
domain = targetName.replaceAll("/", "-");
}
domain = domain.replaceAll("/", "-");


// Check if the domain matches the required pattern
Expand All @@ -144,7 +144,7 @@ class FlexVersionPlugin implements Plugin<Project> {
}
}

return new FlexVersion(domain, commitCount, headSha1, isDirty, tag);
return new FlexVersion(domain, commitCount, headSha1, tag, isDirty);
}

private static Repository getRepo(Project project) {
Expand Down

0 comments on commit 99e02a6

Please sign in to comment.