diff --git a/etc/scripts/release.sh b/etc/scripts/release.sh index a743073395b..f0ab5a9d3b1 100755 --- a/etc/scripts/release.sh +++ b/etc/scripts/release.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2018, 2022 Oracle and/or its affiliates. +# Copyright (c) 2018, 2023 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. @@ -121,6 +121,7 @@ update_version(){ # Hack to update helidon.version for pom in `egrep ".*" -r . --include pom.xml | cut -d ':' -f 1 | sort | uniq ` do + echo "Updating helidon.version property in ${pom} to ${FULL_VERSION}" cat ${pom} | \ sed -e s@'.*'@"${FULL_VERSION}"@g \ > ${pom}.tmp @@ -130,6 +131,7 @@ update_version(){ # Hack to update helidon.version in build.gradle files for bfile in `egrep "helidonversion = .*" -r . --include build.gradle | cut -d ':' -f 1 | sort | uniq ` do + echo "Updating helidonversion property in ${bfile} to ${FULL_VERSION}" cat ${bfile} | \ sed -e s@'helidonversion = .*'@"helidonversion = \'${FULL_VERSION}\'"@g \ > ${bfile}.tmp @@ -139,12 +141,29 @@ update_version(){ # Hack to update helidon-version in doc files for dfile in `egrep ":helidon-version: .*" -r . --include attributes.adoc | cut -d ':' -f 1 | sort | uniq ` do + echo "Updating helidon-version property in ${dfile} to ${FULL_VERSION}" cat ${dfile} | \ sed -e s@':helidon-version: .*'@":helidon-version: ${FULL_VERSION}"@g \ > ${dfile}.tmp mv ${dfile}.tmp ${dfile} done + # Hack to update helidon-version-is-release in doc files + # We are a released version if we are not a SNAPSHOT version + if [[ ${HELIDON_VERSION} == *-SNAPSHOT ]]; then + readonly IS_RELEASED="false" + else + readonly IS_RELEASED="true" + fi + for dfile in `egrep ":helidon-version-is-release: .*" -r . --include attributes.adoc | cut -d ':' -f 1 | sort | uniq ` + do + echo "Updating helidon-version-is-release property in ${dfile} to ${IS_RELEASED}" + cat ${dfile} | \ + sed -e s@':helidon-version-is-release: .*'@":helidon-version-is-release: ${IS_RELEASED}"@g \ + > ${dfile}.tmp + mv ${dfile}.tmp ${dfile} + done + # Invoke prepare hook if [ -n "${PREPARE_HOOKS}" ]; then for prepare_hook in ${PREPARE_HOOKS} ; do