This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new e16c0b3ed5 Fixed: Replace SvnCheckout in Gradle (OFBIZ-12868)
e16c0b3ed5 is described below
commit e16c0b3ed5e428a9bc308c0a4266bd245e719db6
Author: Jacques Le Roux <[email protected]>
AuthorDate: Tue Jan 2 17:12:57 2024 +0100
Fixed: Replace SvnCheckout in Gradle (OFBIZ-12868)
Fixes issues while switching branches
---
pullAllPluginsSource.sh | 5 +++--
pullPluginSource.sh | 7 +++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/pullAllPluginsSource.sh b/pullAllPluginsSource.sh
index eaa5f7e016..fd69ddc790 100755
--- a/pullAllPluginsSource.sh
+++ b/pullAllPluginsSource.sh
@@ -22,6 +22,7 @@ if [ -d "plugins" ]
rm -rf plugins
fi
+# Get the branch used by the framework
git branch --show-current > temp.txt
branch=$(cat temp.txt)
rm temp.txt
@@ -30,9 +31,9 @@ git clone https://github.com/apache/ofbiz-plugins.git plugins
cd plugins
# By default the clone branch is trunk
-if [ ! trunk == "$branch" ]
+if [ ! $branch = trunk ]
then
- git switch -c "$branch" --track origin/"$branch"
+ git switch "$branch"
fi
# remove .git, in this case it's big useless information
diff --git a/pullPluginSource.sh b/pullPluginSource.sh
index c4de388afd..cfe8fdf4c9 100644
--- a/pullPluginSource.sh
+++ b/pullPluginSource.sh
@@ -39,13 +39,16 @@ fi
# Add the plugin
git sparse-checkout add "$1"
+
+# Get the branch used in framework
+cd ..
git branch --show-current > temp.txt
branch=$(cat temp.txt)
rm temp.txt
# By default the clone branch is trunk
-if [ ! trunk == "$branch" ]
+if [ ! "$branch" = trunk ]
then
- call git switch -c "$1" --track origin/"$1"
+ git switch "$branch"
fi
cd ..