You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2024/01/06 16:07:32 UTC
(plc4x) 01/15: feat: Added functionality for automatically preparing the RELEASE_NOTES
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch feature/new-ui-tool
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 83febe041d55cda18fdd770d7e480832cc8dad9a
Author: Christofer Dutz <cd...@apache.org>
AuthorDate: Sat Jan 6 16:17:09 2024 +0100
feat: Added functionality for automatically preparing the RELEASE_NOTES
---
tools/release-0-update-generated-code.sh | 5 +++++
tools/release-1-create-branch.sh | 34 +++++++++++++++++++++++++++++---
2 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/tools/release-0-update-generated-code.sh b/tools/release-0-update-generated-code.sh
index 9b5b56c2fb..e3fe229d3f 100755
--- a/tools/release-0-update-generated-code.sh
+++ b/tools/release-0-update-generated-code.sh
@@ -43,6 +43,10 @@ echo " - Deleting: $DIRECTORY/plc4c/generated-sources"
rm -r "$DIRECTORY/plc4c/generated-sources"
# TODO: delete the generated code for go, c# and python.
+# TODO: Possibly check, if the year in the NOTICE is outdated
+
+# TODO: Possibly check if the RELEASE_NOTES file contains a section for the current version
+
# 3. Run the maven build for all modules with "update-generated-code" enabled (Docker container)
docker compose run --rm releaser bash /ws/mvnw -e -P with-c,with-dotnet,with-go,with-python,with-sandbox,enable-all-checks,update-generated-code -Dmaven.repo.local=/ws/out/.repository clean package
if [ $? -ne 0 ]; then
@@ -60,3 +64,4 @@ else
echo "No changes."
fi
+echo "Pre-release updates complete. Please continue with 'release-1-create-branch.sh' next."
\ No newline at end of file
diff --git a/tools/release-1-create-branch.sh b/tools/release-1-create-branch.sh
index c717e019c9..0a6981665b 100755
--- a/tools/release-1-create-branch.sh
+++ b/tools/release-1-create-branch.sh
@@ -39,11 +39,39 @@ echo "Release Banch Name: '$BRANCH_NAME'"
echo "New develop Version: '$NEW_VERSION'"
# 2. Do a simple maven branch command with pushChanges=false (inside the Docker container)
-docker compose run --rm releaser bash /ws/mvnw -e -P with-c,with-dotnet,with-go,with-python,with-sandbox -Dmaven.repo.local=/ws/out/.repository release:branch -DautoVersionSubmodules=true -DpuchChanges=false -DdevelopmentVersion=$NEW_VERSION -DbranchName=$BRANCH_NAME
+echo docker compose run --rm releaser bash /ws/mvnw -e -P with-c,with-dotnet,with-go,with-python,with-sandbox -Dmaven.repo.local=/ws/out/.repository release:branch -DautoVersionSubmodules=true -DpuchChanges=false -DdevelopmentVersion=$NEW_VERSION -DbranchName=$BRANCH_NAME
if [ $? -ne 0 ]; then
echo "Got non-0 exit code from docker compose, aborting."
exit 1
fi
-# 3. Push the changes (outside)
-git push
\ No newline at end of file
+# 3. Remove the "(Unreleased)" prefix from the current version of the RELEASE_NOTES file
+sed -i '' 's/(Unreleased) *//' ../RELEASE_NOTES
+
+# 4. Add a new section for the new version to the RELEASE_NOTES file
+HEADER="==============================================================
+(Unreleased) Apache PLC4X $NEW_VERSION
+==============================================================
+
+New Features
+------------
+
+Incompatible changes
+--------------------
+
+Bug Fixes
+---------
+
+"
+cat <(echo "$HEADER") ../RELEASE_NOTES
+
+# 5. Commit the change.
+# TODO: Implement ...
+
+# 6. Push the changes (outside)
+#git push
+
+# 7. Switch to the release branch
+#git checkout $BRANCH_NAME
+
+echo "Release branch creation complete. Please continue with 'release-2-prepare-release.sh' as soon as the release branch is ready for being released."
\ No newline at end of file