From ef66d9dd92b2757b36d5f6cada673d8745e3e24e Mon Sep 17 00:00:00 2001 From: Joe Di Pol Date: Mon, 2 Dec 2024 14:49:29 -0800 Subject: [PATCH 1/3] Fix updatehelidonversion.sh to update build.gradle files --- etc/scripts/updatehelidonversion.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/etc/scripts/updatehelidonversion.sh b/etc/scripts/updatehelidonversion.sh index f06d53d8a..e0f99463f 100755 --- a/etc/scripts/updatehelidonversion.sh +++ b/etc/scripts/updatehelidonversion.sh @@ -30,6 +30,7 @@ if [ -z "${NEW_VERSION}" ]; then fi readonly POM_FILES=$(find . -name pom.xml -print) +readonly GRADLE_FILES=$(find . -name build.gradle -print) for f in ${POM_FILES}; do pom_dir=$(dirname $f) @@ -56,3 +57,12 @@ for f in ${POM_FILES}; do fi done +# Update helidonversion property in build.gradle files +for f in ${GRADLE_FILES}; do + # first make sure pom has property + if grep -q "helidonversion =" "$f" ; then + cat $f | sed -e "s#helidonversion = [a-zA-Z0-9.'-]*#helidonversion = '${NEW_VERSION}'#" > ${TMPDIR}/build.gradle + mv "${TMPDIR}/build.gradle" $f + echo "Updated helidonversion in $f with Helidon version ${NEW_VERSION}" + fi +done From 8e616c0e2d475563d5d8061596809a14b470f110 Mon Sep 17 00:00:00 2001 From: Joe Di Pol Date: Mon, 2 Dec 2024 14:51:29 -0800 Subject: [PATCH 2/3] Fix typo --- etc/scripts/updatehelidonversion.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/scripts/updatehelidonversion.sh b/etc/scripts/updatehelidonversion.sh index e0f99463f..f4711fde8 100755 --- a/etc/scripts/updatehelidonversion.sh +++ b/etc/scripts/updatehelidonversion.sh @@ -59,7 +59,7 @@ done # Update helidonversion property in build.gradle files for f in ${GRADLE_FILES}; do - # first make sure pom has property + # first make sure file has property if grep -q "helidonversion =" "$f" ; then cat $f | sed -e "s#helidonversion = [a-zA-Z0-9.'-]*#helidonversion = '${NEW_VERSION}'#" > ${TMPDIR}/build.gradle mv "${TMPDIR}/build.gradle" $f From ff69959899d4ed54782a6f66ee38c3dc54d090dc Mon Sep 17 00:00:00 2001 From: Joe Di Pol Date: Mon, 2 Dec 2024 15:13:39 -0800 Subject: [PATCH 3/3] fix copyright --- etc/scripts/updatehelidonversion.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/scripts/updatehelidonversion.sh b/etc/scripts/updatehelidonversion.sh index f4711fde8..0d194f48c 100755 --- a/etc/scripts/updatehelidonversion.sh +++ b/etc/scripts/updatehelidonversion.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2022, 2023 Oracle and/or its affiliates. +# Copyright (c) 2022, 2024 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.