net.sf.buildbox.releasator.ng.ScmUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of releasator Show documentation
Show all versions of releasator Show documentation
Commandline utility for creating reproducible releases. Minimal parametrization, isolated sandbox for releases. Currently built on top of maven-release-plugin.
The newest version!
package net.sf.buildbox.releasator.ng;
import java.io.File;
public class ScmUtils {
/**
* @param scmUrl -
* @return helper string for creating temporary directory; it should be deterministically derived from scm url, nice enough to remind the location
*/
public static String scmUrlAsFileName(String scmUrl) {
final int n = scmUrl.indexOf(':', 4);
String s = scmUrl.substring(n + 1);
s = s.replace(':', '_');
s = s.replace('/', '_');
return s;
}
public static File workDir() {
return new File(System.getProperty("java.io.tmpdir"));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy