public class GoVersionUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
INCOMPATIBLE |
static int |
ZERO_OR_ONE |
| Constructor and Description |
|---|
GoVersionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getCleanVersion(java.lang.String version) |
static int |
getMajorProjectVersion(java.lang.String project,
org.jfrog.build.api.util.Log log)
Compatible Go module from major version of 2 and above will end with /vMajor
github.com/owner/repo/v3 - 3
github.com/owner/repo/v2 - 2
github.com/owner/repo - 0 or 1
|
static long |
getMajorVersion(java.lang.String version,
org.jfrog.build.api.util.Log log) |
static java.lang.String |
getParent(java.lang.String path) |
static java.lang.String |
getSubModule(java.lang.String projectName) |
static boolean |
isCompatibleGoModuleNaming(java.lang.String projectName,
java.lang.String version,
org.jfrog.build.api.util.Log log)
From major versions of 2+, the project name must end with a /vMajor prefix (for majors of 0 and 1 it will stay without the prefix)
github.com/owner/repo , v2.0.5 - false
github.com/owner/repo , v2.0.5+incompatible - false
github.com/owner/repo/v2 , v2.0.5 - true
github.com/owner/repo , v1.0.5 - true
github.com/owner/repo , v0.0.5 - true
|
public static final java.lang.String INCOMPATIBLE
public static final int ZERO_OR_ONE
public static long getMajorVersion(java.lang.String version,
org.jfrog.build.api.util.Log log)
version - full version stringpublic static int getMajorProjectVersion(java.lang.String project,
org.jfrog.build.api.util.Log log)
public static java.lang.String getCleanVersion(java.lang.String version)
public static boolean isCompatibleGoModuleNaming(java.lang.String projectName,
java.lang.String version,
org.jfrog.build.api.util.Log log)
public static java.lang.String getSubModule(java.lang.String projectName)
public static java.lang.String getParent(java.lang.String path)
path - A file path