docs
docs copied to clipboard
tiup version constraints not documented
Change Request
Please answer the following questions before submitting your issue. Thanks!
- Describe what you find is inappropriate or missing in the existing docs.
I could not find how to get the latest patch version in tiup
, like I would like to install the latest version of 5.1 for testing.
- Describe your suggestion or addition. I will create a PR for tiup-faq.md:
+
+## How do I specify the latest patch version for a specific major.minor version?
+
+Use the format `~{Major}.{Minor}`, like `~5.1` which would currently give `v5.1.3` (the initial `v` is optional)
+You can use different constraints when specifying which version to use.
+vA[.B[.C]] => String match of version resulting in lowest version matching the string (v5.1 => v5.1.0)
+^A[.B[.C]] => Match highest version with Major version >= A and < A+1 (^5.1 => v5.4.0)
+~A[.B[.C]] => Match highest version with Minor version >= B and < B+1 (~5.1 => v5.1.3)
+(at the time of writing latest version in 5.1 series is 5.1.3 and 5.4 series is 5.4.0)
- Provide some reference materials (documents, websites, etc) if you could. See https://github.com/pingcap/tiup/blob/382d0e95f1c68e2fe272266d77abd57f273f7f31/pkg/utils/semver.go#L120