Skip to content

Commit

Permalink
fix scripts/bump_cola_version
Browse files Browse the repository at this point in the history
  • Loading branch information
oldratlee committed Feb 26, 2022
1 parent 99b73f0 commit 05f067a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
25 changes: 14 additions & 11 deletions scripts/bump_cola_version
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,46 @@ set -eEuo pipefail
# adjust current dir to script dir
cd "$(dirname "$(readlink -f "$0")")"

source common.sh
source common_build.sh
source bash-buddy/lib/trap_error_info.sh
source bash-buddy/lib/common_utils.sh
source bash-buddy/lib/java_build_utils.sh

readonly nl=$'\n' # new line

# shellcheck disable=SC2154
[ $# -ne 1 ] && die "need only 1 argument for version!$nl${nl}usage:$nl $0 4.x.y"
[ $# -ne 1 ] && cu::die "need only 1 argument for version!$nl${nl}usage:$nl $0 4.x.y"
readonly bump_version="$1"

(
headInfo "bump cola version of cola-components to $bump_version"
cu::head_line_echo "bump cola version of cola-components to $bump_version"
cd ../cola-components/

MVN_WITH_BASIC_OPTIONS \
jvb::mvn_cmd \
org.codehaus.mojo:versions-maven-plugin:2.8.1:set \
-DgenerateBackupPoms=false \
-DnewVersion="$bump_version"
)

(
headInfo "bump cola version of cola-archetypes to $bump_version"
cu::head_line_echo "bump cola version of cola-archetypes to $bump_version"
cd ../cola-archetypes/

MVN_WITH_BASIC_OPTIONS \
jvb::mvn_cmd \
org.codehaus.mojo:versions-maven-plugin:2.8.1:set \
-DgenerateBackupPoms=false \
-DnewVersion="$bump_version"

logAndRun -s \
cu::log_then_run -s \
sed -ri 's~(<cola.components.version>)(.*)(</cola.components.version>)~\1'"$bump_version"'\3~' \
cola-archetype-service/src/main/resources/archetype-resources/pom.xml \
cola-archetype-web/src/main/resources/archetype-resources/pom.xml
)

(
headInfo "bump cola version of samples to $bump_version"
cu::head_line_echo "bump cola version of samples to $bump_version"
cd ../samples/

logAndRun -s \
sed -ri 's~(<cola.framework.version>)(.*)(</cola.framework.version>)~\1'"$bump_version"'\3~' \
cu::log_then_run -s \
sed -ri 's~(<cola.components.version>)(.*)(</cola.components.version>)~\1'"$bump_version"'\3~' \
craftsman/pom.xml
)
4 changes: 0 additions & 4 deletions scripts/integration_test
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ test_cola_archetype() {
# default jdk 11, do build and test
########################################

export CI_TEST_MODE=true
export DCM_AGENT_SUPRESS_EXCEPTION_STACK=true

default_build_jdk_version=11

prepare_jdks::switch_java_home_to_jdk "$default_build_jdk_version"
Expand All @@ -132,7 +129,6 @@ test_cola_archetype

########################################
# test multi-version java
# shellcheck disable=SC2154
########################################
for jhome_var_name in "${JDK_HOME_VAR_NAMES[@]}"; do
# already tested by above `mvn install`
Expand Down

0 comments on commit 05f067a

Please sign in to comment.