This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch release18.12 in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release18.12 by this push: new 99dcc9d1eb Fixed: Replace SvnCheckout in Gradle (OFBIZ-12868) 99dcc9d1eb is described below commit 99dcc9d1ebdbfbe9a7d7a87d1a1a06d2903547b8 Author: Jacques Le Roux <jacques.le.r...@les7arts.com> 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 ..