Skip to content

Commit 80a0e87

Browse files
committed
release build dir http(s) and file prefixes strip added
1 parent fdf70bf commit 80a0e87

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main/java/org/scm4j/releaser/Utils.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
import org.scm4j.releaser.conf.Component;
77
import org.scm4j.releaser.conf.TagDesc;
88
import org.scm4j.releaser.exceptions.EReleaserException;
9+
import org.scm4j.vcs.api.workingcopy.IVCSRepositoryWorkspace;
10+
import org.scm4j.vcs.api.workingcopy.IVCSWorkspace;
11+
import org.scm4j.vcs.api.workingcopy.VCSWorkspace;
912

1013
import java.io.File;
1114
import java.util.Collection;
@@ -70,9 +73,9 @@ public static String getReleaseBranchName(Component comp, Version forVersion) {
7073
}
7174

7275
public static File getBuildDir(Component comp, Version forVersion) {
73-
File buildDir = new File(RELEASES_DIR, comp.getUrl().replaceAll("[^a-zA-Z0-9.-]", "_"));
74-
buildDir = new File(buildDir, getReleaseBranchName(comp, forVersion).replaceAll("[^a-zA-Z0-9.-]", "_"));
75-
return buildDir;
76+
IVCSWorkspace ws = new VCSWorkspace(RELEASES_DIR.toString());
77+
IVCSRepositoryWorkspace rws = ws.getVCSRepositoryWorkspace(comp.getUrl());
78+
return rws.getRepoFolder();
7679
}
7780

7881
public static TagDesc getTagDesc(String verStr) {

0 commit comments

Comments
 (0)