summaryrefslogtreecommitdiffstats
path: root/component
diff options
context:
space:
mode:
authorHåkon Hallingstad <hakon@yahooinc.com>2022-08-18 16:57:55 +0200
committerHåkon Hallingstad <hakon@yahooinc.com>2022-08-18 16:57:55 +0200
commitb679206de2431f11e52e6734abfcaefa40554037 (patch)
treebde9c884a71f552165d5554596c48bcd3f63fdf1 /component
parent7a65553cd4efc3574cb1bd859b17008ecdf878d6 (diff)
Allow overriding wanted docker tag and vespa version
Diffstat (limited to 'component')
-rw-r--r--component/abi-spec.json1
-rw-r--r--component/src/main/java/com/yahoo/component/Version.java6
2 files changed, 7 insertions, 0 deletions
diff --git a/component/abi-spec.json b/component/abi-spec.json
index d990a9077b4..cfbbdf4b306 100644
--- a/component/abi-spec.json
+++ b/component/abi-spec.json
@@ -138,6 +138,7 @@
"public void <init>(java.lang.String)",
"public void <init>(com.yahoo.text.Utf8Array)",
"public static com.yahoo.component.Version fromString(java.lang.String)",
+ "public com.yahoo.component.Version withQualifier(java.lang.String)",
"public java.lang.String toFullString()",
"public int getMajor()",
"public int getMinor()",
diff --git a/component/src/main/java/com/yahoo/component/Version.java b/component/src/main/java/com/yahoo/component/Version.java
index 1d4546c0c58..db8606d31fa 100644
--- a/component/src/main/java/com/yahoo/component/Version.java
+++ b/component/src/main/java/com/yahoo/component/Version.java
@@ -202,6 +202,12 @@ public final class Version implements Comparable<Version> {
return (versionString == null) ? emptyVersion :new Version(versionString);
}
+ public Version withQualifier(String qualifier) {
+ if (qualifier.indexOf('.') != -1)
+ throw new IllegalArgumentException("Qualifier cannot contain '.'");
+ return new Version(major, minor, micro, qualifier);
+ }
+
/**
* Must be called on construction after the component values are set
*