This is an automated email from the ASF dual-hosted git repository. pcongiusti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git
commit e09bf139da8aa0a39e51098de146ab382e045364 Author: Pasquale Congiusti <[email protected]> AuthorDate: Fri May 27 11:12:30 2022 +0200 feat(deps): script to bump dependencies A script to automate the major dependency upgrades. --- README.adoc | 15 ++++++ scripts/bump.sh | 98 +++++++++++++++++++++++++++++++++++++ support/camel-k-runtime-bom/pom.xml | 2 +- 3 files changed, 114 insertions(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index 4422b6b8..cc972810 100644 --- a/README.adoc +++ b/README.adoc @@ -8,6 +8,21 @@ image:https://github.com/apache/camel-k-runtime/workflows/Build/badge.svg["Build This repository contains the Apache Camel-K Runtime bits used by the https://github.com/apache/camel-k[_main project_] +== How to bump the main dependencies + +In order to simplify the maintenance, you can use a script in `/script/` directory which take care of bumping the versions for the project. As we maintain a BOM which is not inheriting the main project parent, this is very handy to keep versions aligned. Instructions how to run the script: +.... +Usage: ./script/bump.sh [options] +--version Bump Camel K runtime version +--camel Bump Camel version +--camel-quarkus Bump Camel-Quarkus version +--quarkus Bump Quarkus version +--graalvm Bump GraalVM version +--help This help message + +Example: ./script/bump.sh --version 1.14.0-SNAPSHOT --camel 3.16.0 +.... + == Instructions for local debugging You can https://camel.apache.org/camel-k/latest/contributing/local-development.html#_local_camel_k_runtime[follow these instructions] in order to run and debug a Camel K integration based on a local Camel K runtime. \ No newline at end of file diff --git a/scripts/bump.sh b/scripts/bump.sh new file mode 100755 index 00000000..ac0c4c83 --- /dev/null +++ b/scripts/bump.sh @@ -0,0 +1,98 @@ +#!/bin/bash + +set -e + +display_usage() { + +cat <<EOF +Bump Camel K Runtime project Camel and Quarkus related dependencies + +Usage: ./script/bump.sh [options] +--version Bump Camel K runtime version +--camel Bump Camel version +--camel-quarkus Bump Camel-Quarkus version +--quarkus Bump Quarkus version +--graalvm Bump GraalVM version +--help This help message + +Example: ./script/bump.sh --version 1.14.0-SNAPSHOT --camel 3.16.0 +EOF + +} + +VERSION="" +CAMEL="" +CAMELQUARKUS="" +QUARKUS="" +GRAALVM="" + +main() { + parse_args $@ + + if [[ ! -z "$VERSION" ]]; then + mvn versions:set -DnewVersion="$VERSION" -DgenerateBackupPoms=false + mvn versions:set -DnewVersion="$VERSION" -f support/camel-k-runtime-bom/pom.xml -DgenerateBackupPoms=false + echo "Camel K runtime project set to $VERSION" + fi + + if [[ ! -z "$CAMEL" ]]; then + mvn versions:set-property -Dproperty="camel-version" -DnewVersion="$CAMEL" + echo "Camel version set to $CAMEL" + fi + + if [[ ! -z "$CAMELQUARKUS" ]]; then + mvn versions:set-property -Dproperty="camel-quarkus-version" -DnewVersion="$CAMELQUARKUS" + echo "Camel Quarkus version set to $CAMELQUARKUS" + fi + + if [[ ! -z "$QUARKUS" ]]; then + mvn versions:set-property -Dproperty="quarkus-version" -DnewVersion="$QUARKUS" + echo "Quarkus platform version set to $QUARKUS" + fi + + if [[ ! -z "$GRAALVM" ]]; then + mvn versions:set-property -Dproperty="graalvm-version" -DnewVersion="$GRAALVM" + echo "GraalVM version set to $GRAALVM" + fi +} + +parse_args(){ + while [ $# -gt 0 ] + do + arg="$1" + case $arg in + -h|--help) + display_usage + exit 0 + ;; + --version) + shift + VERSION="$1" + ;; + --camel) + shift + CAMEL="$1" + ;; + --camel-quarkus) + shift + CAMELQUARKUS="$1" + ;; + --quarkus) + shift + QUARKUS="$1" + ;; + --graalvm) + shift + GRAALVM="$1" + ;; + *) + echo "❗ unknown argument: $1" + display_usage + exit 1 + ;; + esac + shift + done +} + +main $* diff --git a/support/camel-k-runtime-bom/pom.xml b/support/camel-k-runtime-bom/pom.xml index 94a85cba..6a150bfa 100644 --- a/support/camel-k-runtime-bom/pom.xml +++ b/support/camel-k-runtime-bom/pom.xml @@ -28,7 +28,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.apache.camel.k</groupId> <artifactId>camel-k-runtime-bom</artifactId> - <version>1.13.1-SNAPSHOT</version> + <version>1.14.0-SNAPSHOT</version> <packaging>pom</packaging> <properties>
