This is an automated email from the ASF dual-hosted git repository. astefanutti pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 2e3c089f05b5ddb231993ad69613481c9c13f854 Author: Antonin Stefanutti <[email protected]> AuthorDate: Thu Oct 24 18:37:58 2019 +0200 feat(quarkus): Add default values for Camel Quarkus / Quarkus versions and constraints --- pkg/trait/quarkus.go | 6 ++---- pkg/util/camel/catalog.go | 5 +++-- pkg/util/defaults/defaults.go | 12 ++++++++++++ script/Makefile | 15 +++++++++++++++ 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/pkg/trait/quarkus.go b/pkg/trait/quarkus.go index 7a9ab4d..9dfe8ba 100644 --- a/pkg/trait/quarkus.go +++ b/pkg/trait/quarkus.go @@ -140,8 +140,7 @@ func (t *quarkusTrait) determineQuarkusVersion(e *Environment) string { e.Platform.Spec.Build.RuntimeProvider.Quarkus.QuarkusVersion != "" { return e.Platform.Spec.Build.RuntimeProvider.Quarkus.QuarkusVersion } - // FIXME - return "0.21.2" + return defaults.QuarkusVersionConstraint } func (t *quarkusTrait) determineCamelQuarkusVersion(e *Environment) string { @@ -160,6 +159,5 @@ func (t *quarkusTrait) determineCamelQuarkusVersion(e *Environment) string { e.Platform.Spec.Build.RuntimeProvider.Quarkus.CamelQuarkusVersion != "" { return e.Platform.Spec.Build.RuntimeProvider.Quarkus.CamelQuarkusVersion } - // FIXME - return "0.2.0" + return defaults.CamelQuarkusVersionConstraint } diff --git a/pkg/util/camel/catalog.go b/pkg/util/camel/catalog.go index e4442c9..adcf510 100644 --- a/pkg/util/camel/catalog.go +++ b/pkg/util/camel/catalog.go @@ -35,8 +35,9 @@ func DefaultCatalog() (*RuntimeCatalog, error) { // QuarkusCatalog -- func QuarkusCatalog() (*RuntimeCatalog, error) { return catalogForRuntimeProvider(v1alpha1.QuarkusRuntimeProvider{ - CamelQuarkusVersion: "0.2.0", - QuarkusVersion: "0.21.2", + // Can be replaced with the default Camel Quarkus version when it's stable + CamelQuarkusVersion: defaults.CamelQuarkusVersionConstraint, + QuarkusVersion: defaults.DefaultQuarkusVersion, }) } diff --git a/pkg/util/defaults/defaults.go b/pkg/util/defaults/defaults.go index e131d10..660e4b4 100644 --- a/pkg/util/defaults/defaults.go +++ b/pkg/util/defaults/defaults.go @@ -36,6 +36,18 @@ const ( // RuntimeVersionConstraint -- RuntimeVersionConstraint = ">=1.0.5" + // DefaultCamelQuarkusVersion -- + DefaultCamelQuarkusVersion = "0.2.1-SNAPSHOT" + + // CamelQuarkusVersionConstraint -- + CamelQuarkusVersionConstraint = ">=0.2.0" + + // DefaultQuarkusVersion -- + DefaultQuarkusVersion = "0.21.2" + + // QuarkusVersionConstraint -- + QuarkusVersionConstraint = ">=0.21.2" + // KanikoVersion -- KanikoVersion = "0.9.0" diff --git a/script/Makefile b/script/Makefile index e639858..80f5a48 100644 --- a/script/Makefile +++ b/script/Makefile @@ -21,6 +21,9 @@ RUNTIME_VERSION_CONSTRAINT := >=1.0.5 CAMEL_VERSION := 3.0.0-RC1 CAMEL_VERSION_CONSTRAINT := >=3.0.0-RC1 CAMEL_QUARKUS_VERSION := 0.2.1-SNAPSHOT +CAMEL_QUARKUS_VERSION_CONSTRAINT := >=0.2.0 +QUARKUS_VERSION := 0.21.2 +QUARKUS_VERSION_CONSTRAINT := >=0.21.2 KANIKO_VERSION := 0.9.0 BASE_IMAGE := fabric8/s2i-java:3.0-java8 LOCAL_REPOSITORY := /tmp/artifacts/m2 @@ -91,6 +94,18 @@ codegen: @echo " // RuntimeVersionConstraint -- " >> $(VERSIONFILE) @echo " RuntimeVersionConstraint = \"$(RUNTIME_VERSION_CONSTRAINT)\"" >> $(VERSIONFILE) @echo "" >> $(VERSIONFILE) + @echo " // DefaultCamelQuarkusVersion -- " >> $(VERSIONFILE) + @echo " DefaultCamelQuarkusVersion = \"$(CAMEL_QUARKUS_VERSION)\"" >> $(VERSIONFILE) + @echo "" >> $(VERSIONFILE) + @echo " // CamelQuarkusVersionConstraint -- " >> $(VERSIONFILE) + @echo " CamelQuarkusVersionConstraint = \"$(CAMEL_QUARKUS_VERSION_CONSTRAINT)\"" >> $(VERSIONFILE) + @echo "" >> $(VERSIONFILE) + @echo " // DefaultQuarkusVersion -- " >> $(VERSIONFILE) + @echo " DefaultQuarkusVersion = \"$(QUARKUS_VERSION)\"" >> $(VERSIONFILE) + @echo "" >> $(VERSIONFILE) + @echo " // QuarkusVersionConstraint -- " >> $(VERSIONFILE) + @echo " QuarkusVersionConstraint = \"$(QUARKUS_VERSION_CONSTRAINT)\"" >> $(VERSIONFILE) + @echo "" >> $(VERSIONFILE) @echo " // KanikoVersion -- " >> $(VERSIONFILE) @echo " KanikoVersion = \"$(KANIKO_VERSION)\"" >> $(VERSIONFILE) @echo "" >> $(VERSIONFILE)
