All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.buildbox.releasator.ng.ScmUtils Maven / Gradle / Ivy

Go to download

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