Golang
kind: golang
source | condition | target |
---|---|---|
✔ | ✔ | ✗ |
source
The Golang "source" retrieves the Golang version matching then versioning rule.
condition
The Golang "condition" checks if the Golang version matching then versioning rule exist.
target
the Golang "target" is not supported.
Parameter
Name | Type | Description | Required |
---|---|---|---|
version | string | [C] Version defines a specific golang version | |
versionfilter | object | [S] VersionFilter provides parameters to specify version pattern and its type like regex, semver, or just latest. | |
kind | string | specifies the version kind such as semver, regex, or latest | |
pattern | string | specifies the version pattern according the version kind | |
strict | boolean | strict enforce strict versioning rule. Only used for semantic versioning at this time |
Example
# updatecli.yaml
name: "Golang example"
sources:
default:
name: Get Golang version
kind: golang
spec:
versionfilter:
kind: semver
pattern: "1.15.x"
conditions:
# The version to check is inherited from source "default"
default:
name: Checks that golang version from source default exists
kind: golang
sourceid: default
nosourceinput:
disablesourceinput: true
name: Checks that golang version 1.20.1 exists
kind: golang
spec:
version: "1.20.1"