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/08 07:46:15 UTC

(plc4x) 02/02: chore: Fixed spelling errors in the comments and some minor refactorings of the code.

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 e37b0343791867267fa34c4c8a7ce53c7b39b448
Author: Christofer Dutz <cd...@apache.org>
AuthorDate: Mon Jan 8 08:46:05 2024 +0100

    chore: Fixed spelling errors in the comments and some minor refactorings of the code.
---
 tools/release-0-update-generated-code.sh |  8 ++++----
 tools/release-1-create-branch.sh         | 14 +++++++-------
 tools/release-2-prepare-release.sh       |  8 ++++----
 tools/release-3-perform-release.sh       |  2 +-
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/tools/release-0-update-generated-code.sh b/tools/release-0-update-generated-code.sh
index 86b094ece0..2ef80cbb73 100755
--- a/tools/release-0-update-generated-code.sh
+++ b/tools/release-0-update-generated-code.sh
@@ -20,14 +20,14 @@
 # ----------------------------------------------------------------------------
 DIRECTORY=..
 
-# 0. Check if there are uncommited changes as these would automatically be committed (local)
-if [[ `git status --porcelain` ]]; then
+# 0. Check if there are uncommitted changes as these would automatically be committed (local)
+if [[ $(git status --porcelain) ]]; then
   # Changes
   echo "There are untracked files or changed files, aborting."
   exit 1
 fi
 
-# 1. Delete the pre-exising "out" driectory that contains the maven local repo and deployments (local)
+# 1. Delete the pre-exising "out" directory that contains the maven local repo and deployments (local)
 echo "Deleting the maven local repo and previous deployments"
 rm -r $DIRECTORY/out
 
@@ -53,7 +53,7 @@ if [ $? -ne 0 ]; then
 fi
 
 # Check if there is unchanged files (or committing and pushing nothing will fail) (local)
-if [[ `git status --porcelain` ]]; then
+if [[ $(git status --porcelain) ]]; then
   echo "Committing changes."
   git add --all
   git commit -m "chore: updated generated code"
diff --git a/tools/release-1-create-branch.sh b/tools/release-1-create-branch.sh
index 07ed8b8d00..259a67728f 100755
--- a/tools/release-1-create-branch.sh
+++ b/tools/release-1-create-branch.sh
@@ -19,15 +19,15 @@
 # under the License.
 # ----------------------------------------------------------------------------
 
-# 0. Check if there are uncommited changes as these would automatically be committed (local)
-if [[ `git status --porcelain` ]]; then
+# 0. Check if there are uncommitted changes as these would automatically be committed (local)
+if [[ $(git status --porcelain) ]]; then
   # Changes
   echo "There are untracked files or changed files, aborting."
   exit 1
 fi
 
-# 1. Get and calculate the current veerion (local)
-PROJECT_VERSION=$(../mvnw -f ../pom.xml -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
+# 1. Get and calculate the current version (local)
+PROJECT_VERSION=$(../mvnw -f ../pom.xml -q -Dexec.executable=echo -Dexec.args="${project.version}" --non-recursive exec:exec)
 RELEASE_VERSION=${PROJECT_VERSION%"-SNAPSHOT"}
 RELEASE_SHORT_VERSION=${RELEASE_VERSION%".0"}
 BRANCH_NAME="rel/$RELEASE_SHORT_VERSION"
@@ -35,7 +35,7 @@ IFS='.' read -ra VERSION_SEGMENTS <<< "$RELEASE_VERSION"
 NEW_VERSION="${VERSION_SEGMENTS[0]}.$((VERSION_SEGMENTS[1] + 1)).0-SNAPSHOT"
 echo "Current Version: '$PROJECT_VERSION'"
 echo "Release Version: '$RELEASE_VERSION'"
-echo "Release Banch Name: '$BRANCH_NAME'"
+echo "Release Branch Name: '$BRANCH_NAME'"
 echo "New develop Version: '$NEW_VERSION'"
 
 # 2. Ask if the RELEASE_NOTES have been filled out at all (local)
@@ -49,7 +49,7 @@ case $yn in
 esac
 
 # 3. 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 -DpushChanges=false -DdevelopmentVersion=$NEW_VERSION -DbranchName=$BRANCH_NAME
+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 -DpushChanges=false -DdevelopmentVersion="$NEW_VERSION" -DbranchName="$BRANCH_NAME"
 if [ $? -ne 0 ]; then
     echo "Got non-0 exit code from docker compose, aborting."
     exit 1
@@ -84,6 +84,6 @@ git commit -m "chore: prepared the RELEASE_NOTES for the next version."
 git push
 
 # 8. Switch to the release branch (local)
-git checkout $BRANCH_NAME
+git checkout "$BRANCH_NAME"
 
 echo "Release branch creation complete. We have switched the local branch to the release branch. 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
diff --git a/tools/release-2-prepare-release.sh b/tools/release-2-prepare-release.sh
index 886593a31c..1bd91423d8 100755
--- a/tools/release-2-prepare-release.sh
+++ b/tools/release-2-prepare-release.sh
@@ -19,20 +19,20 @@
 # under the License.
 # ----------------------------------------------------------------------------
 
-# 0. Check if there are uncommited changes as these would automatically be committed (local)
-if [[ `git status --porcelain` ]]; then
+# 0. Check if there are uncommitted changes as these would automatically be committed (local)
+if [[ $(git status --porcelain) ]]; then
   # Changes
   echo "There are untracked files or changed files, aborting."
   exit 1
 fi
 
-PROJECT_VERSION=$(../mvnw -f ../pom.xml -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
+PROJECT_VERSION=$(../mvnw -f ../pom.xml -q -Dexec.executable=echo -Dexec.args="${project.version}" --non-recursive exec:exec)
 RELEASE_VERSION=${PROJECT_VERSION%"-SNAPSHOT"}
 IFS='.' read -ra VERSION_SEGMENTS <<< "$RELEASE_VERSION"
 NEW_VERSION="${VERSION_SEGMENTS[0]}.${VERSION_SEGMENTS[1]}.$((VERSION_SEGMENTS[2] + 1))-SNAPSHOT"
 
 # 1. Do a simple release-prepare 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:prepare -DautoVersionSubmodules=true -DpushChanges=false -DreleaseVersion=$RELEASE_VERSION -DdevelopmentVersion=$NEW_VERSION -Dtag=v$RELEASE_VERSION
+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:prepare -DautoVersionSubmodules=true -DpushChanges=false -DreleaseVersion="$RELEASE_VERSION" -DdevelopmentVersion="$NEW_VERSION" -Dtag="v$RELEASE_VERSION"
 if [ $? -ne 0 ]; then
     echo "Got non-0 exit code from docker compose, aborting."
     exit 1
diff --git a/tools/release-3-perform-release.sh b/tools/release-3-perform-release.sh
index 0497962c08..447365bd4c 100755
--- a/tools/release-3-perform-release.sh
+++ b/tools/release-3-perform-release.sh
@@ -26,7 +26,7 @@
 #  exit 1
 #fi
 
-# 1. Do a simple release-perfoem command skip sigining of artifacts and deploy to local directory (inside the Docker container)
+# 1. Do a simple release-perform command skip signing of artifacts and deploy to local directory (inside the Docker container)
 docker compose run --rm releaser bash /ws/mvnw -e -Dmaven.repo.local=/ws/out/.repository -DaltDeploymentRepository=snapshot-repo::default::file:/ws/out/.local-artifacts-dir release:perform
 
 # 2. Sign the artifacts