Skip to content

Commit

Permalink
fix #1126: remove constraints and use default versions
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaferraro committed Dec 13, 2019
1 parent 44eb5d8 commit 363cfb6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 32 deletions.
4 changes: 2 additions & 2 deletions pkg/platform/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ func setPlatformDefaults(ctx context.Context, c client.Client, p *v1alpha1.Integ
p.Status.Profile = DetermineBestProfile(ctx, c, p)
}
if p.Status.Build.CamelVersion == "" {
p.Status.Build.CamelVersion = defaults.CamelVersionConstraint
p.Status.Build.CamelVersion = defaults.DefaultCamelVersion
}
if p.Status.Build.RuntimeVersion == "" {
p.Status.Build.RuntimeVersion = defaults.RuntimeVersionConstraint
p.Status.Build.RuntimeVersion = defaults.DefaultRuntimeVersion
}
if p.Status.Build.BaseImage == "" {
p.Status.Build.BaseImage = defaults.BaseImage
Expand Down
2 changes: 1 addition & 1 deletion pkg/trait/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func createBuilderTestEnv(cluster v1alpha1.IntegrationPlatformCluster, strategy
Build: v1alpha1.IntegrationPlatformBuildSpec{
PublishStrategy: strategy,
Registry: v1alpha1.IntegrationPlatformRegistrySpec{Address: "registry"},
CamelVersion: defaults.CamelVersionConstraint,
CamelVersion: defaults.DefaultCamelVersion,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/camel/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func DefaultCatalog() (*RuntimeCatalog, error) {
// QuarkusCatalog --
func QuarkusCatalog() (*RuntimeCatalog, error) {
return catalogForRuntimeProvider(v1alpha1.QuarkusRuntimeProvider{
CamelQuarkusVersion: defaults.CamelQuarkusVersionConstraint,
CamelQuarkusVersion: defaults.DefaultCamelQuarkusVersion,
QuarkusVersion: defaults.DefaultQuarkusVersion,
})
}
Expand Down
13 changes: 1 addition & 12 deletions pkg/util/defaults/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package defaults

// ***********************
Expand All @@ -27,27 +28,15 @@ const (
// DefaultCamelVersion --
DefaultCamelVersion = "3.0.0-RC3"

// CamelVersionConstraint --
CamelVersionConstraint = ">=3.0.0-RC3"

// DefaultRuntimeVersion --
DefaultRuntimeVersion = "1.0.7"

// RuntimeVersionConstraint --
RuntimeVersionConstraint = ">=1.0.7"

// DefaultCamelQuarkusVersion --
DefaultCamelQuarkusVersion = "0.3.1"

// CamelQuarkusVersionConstraint --
CamelQuarkusVersionConstraint = ">=0.3.1"

// DefaultQuarkusVersion --
DefaultQuarkusVersion = "0.27.0"

// QuarkusVersionConstraint --
QuarkusVersionConstraint = ">=0.27.0"

// KanikoVersion --
KanikoVersion = "0.9.0"

Expand Down
17 changes: 1 addition & 16 deletions script/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ VERSIONFILE := pkg/util/defaults/defaults.go
VERSION := 1.0.0-M5-SNAPSHOT
LAST_RELEASED_VERSION := 1.0.0-M3
RUNTIME_VERSION := 1.0.7
RUNTIME_VERSION_CONSTRAINT := >=1.0.7
CAMEL_VERSION := 3.0.0-RC3
CAMEL_VERSION_CONSTRAINT := >=3.0.0-RC3
CAMEL_QUARKUS_VERSION := 0.3.1
CAMEL_QUARKUS_VERSION_CONSTRAINT := >=0.3.1
QUARKUS_VERSION := 0.27.0
QUARKUS_VERSION_CONSTRAINT := >=0.27.0
KANIKO_VERSION := 0.9.0
BASE_IMAGE := fabric8/s2i-java:3.0-java8
LOCAL_REPOSITORY := /tmp/artifacts/m2
Expand Down Expand Up @@ -72,6 +68,7 @@ codegen:
@echo "/*" > $(VERSIONFILE)
@echo "$$LICENSE_HEADER" >> $(VERSIONFILE)
@echo "*/" >> $(VERSIONFILE)
@echo "" >> $(VERSIONFILE)
@echo "package defaults" >> $(VERSIONFILE)
@echo "" >> $(VERSIONFILE)
@echo "// ***********************" >> $(VERSIONFILE)
Expand All @@ -85,27 +82,15 @@ codegen:
@echo " // DefaultCamelVersion -- " >> $(VERSIONFILE)
@echo " DefaultCamelVersion = \"$(CAMEL_VERSION)\"" >> $(VERSIONFILE)
@echo "" >> $(VERSIONFILE)
@echo " // CamelVersionConstraint -- " >> $(VERSIONFILE)
@echo " CamelVersionConstraint = \"$(CAMEL_VERSION_CONSTRAINT)\"" >> $(VERSIONFILE)
@echo "" >> $(VERSIONFILE)
@echo " // DefaultRuntimeVersion -- " >> $(VERSIONFILE)
@echo " DefaultRuntimeVersion = \"$(RUNTIME_VERSION)\"" >> $(VERSIONFILE)
@echo "" >> $(VERSIONFILE)
@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)
Expand Down

0 comments on commit 363cfb6

Please sign in to comment.