From 7e75976520f43b8606d872a0f532cfae4d4e1c63 Mon Sep 17 00:00:00 2001 From: Michael Jacoby Date: Wed, 11 Dec 2024 08:12:20 +0100 Subject: [PATCH] =?UTF-8?q?[Feature]=20Automatically=20update=20FA=C2=B3ST?= =?UTF-8?q?=20API=20version=20in=20profiles=20on=20release=20(#980)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update release.sh --- release.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/release.sh b/release.sh index 3545b32e5..bde0760cf 100644 --- a/release.sh +++ b/release.sh @@ -65,6 +65,19 @@ function replaceVersion() sed -r -z 's/(\x27de.fraunhofer.iosb.ilt.faaast.service:starter:)[^\x27]*\x27/\1'"${new_version}"'\x27/g' -i "$file" } +# argument: newVersion +function updateServiceProfileUrls() +{ + echo "VERSION=$VERSION" + echo "NEXTVERSION=$NEXTVERSION" + echo "ARGUMENT=$1" + local new_version=$1 + local major=$(echo "$new_version" | sed -E 's/^([0-9]+)\..*/\1/') + local minor=$(echo "$new_version" | sed -E 's/^[0-9]+\.([0-9]+)\..*/\1/') + local file="./model/src/main/java/de/fraunhofer/iosb/ilt/faaast/service/model/ServiceSpecificationProfile.java" + sed -i "s|https://github.com/FraunhoferIOSB/FAAAST-Service/API/[0-9]*\/[0-9]*\/|https://github.com/FraunhoferIOSB/FAAAST-Service/API/$major/$minor/|g" "$file" +} + echo "Releasing: ${VERSION}, tagged: v${VERSION}, @@ -106,6 +119,7 @@ replaceValue "$README_FILE" "$TAG_DOWNLOAD_SNAPSHOT" "$README_LATEST_SNAPSHOT_VE replaceValue "$INSTALLATION_FILE" "$TAG_DOWNLOAD_SNAPSHOT" "$INSTALLATION_LATEST_SNAPSHOT_VERSION_CONTENT" sed -i "2 i \\n" "$CHANGELOG_FILE" replaceValue "$CHANGELOG_FILE" "$TAG_CHANGELOG_HEADER" "## ${NEXTVERSION}-SNAPSHOT (current development version)" +updateServiceProfileUrls $NEXTVERSION mvn -B spotless:apply echo "Git add ."