Library to fetch the url and metadata for released artifacts.
Supports:
-
Snapshots builds
7.4.0-SNAPSHOT
latest-MAJOR
whereMAJOR
is a single integer representing the major you want a snapshot forlatest
latest greatest
-
BuildCandidates
commit_hash:version
a build candidate for a version
-
Released versions
MAJOR.MINOR.PATH
whereMAJOR
is still supported as defined by the EOL policy of Elastic.- Note if the version exists but is not yet released it will resolve as a build candidate
First create an elastic version
var version = ElasticVersion.From(versionString);
Where versionString
is a string in the aforementioned formats. version.ArtifactBuildState
represents the type of version parsed.
var version = ElasticVersion.From(versionString);
To go from a version to an artifact do the following
var product = Product.From("elasticsearch");
var artifact = version.Artifact(product);
By first creating a product
we can then pass that product
to version.Artifact
to get an artifact to that product's version.
A product can be a main product such as elasticsearch
or a related product e.g
var product = Product.From("elasticsearch-plugins", "analysis-icu");
var artifact = version.Artifact(product);
To aid with discoverability we ship with some statics so you do not need to guess the right monikers.
Product.Elasticsearch;
Product.Kibana;
Product.ElasticsearchPlugin(ElasticsearchPlugin.AnalysisIcu);