This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch release22.01 in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release22.01 by this push: new 4501959216 Fixed: We have build problems in branches with plugins (OFBIZ-11284) 4501959216 is described below commit 450195921698a35c5cba22325af315b510764dfe Author: Jacques Le Roux <jacques.le.r...@les7arts.com> AuthorDate: Mon Feb 13 18:21:57 2023 +0100 Fixed: We have build problems in branches with plugins (OFBIZ-11284) Fixes using Subversion over Github in build.gradle to avoid hard coded branches and rather uses the real current branch While at it, replaces curled double and single quotes by straight ones --- build.gradle | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index d10cce2109..7a1db6944a 100644 --- a/build.gradle +++ b/build.gradle @@ -142,6 +142,10 @@ tasks.withType(JavaCompile) { if (!project.hasProperty('skipNpmInstall')) finalizedBy 'npmInstall' } +def getCurrentGitBranch() { + return "git branch --show-current".execute().text.trim() +} + // defines the footer files for git info def File gitFooterFile = file("${rootDir}/runtime/GitInfo.ftl") @@ -358,10 +362,10 @@ jar.manifest.attributes( // Checks OFBiz Java coding conventions. checkstyle { - // Defining a maximum number of “tolerated” errors ensures that + // Defining a maximum number of "tolerated" errors ensures that // this number cannot increase in the future. It corresponds to // the sum of errors found last time it was changed after using the - // ‘checkstyle’ tool present in the framework and in the official + // 'checkstyle' tool present in the framework and in the official // plugins. tasks.checkstyleMain.maxErrors = 0 // Currently there are no errors so we can show new one when they appear @@ -954,7 +958,8 @@ task pullPluginSource(group: ofbizPlugin, description: 'Download and install a p if (project.hasProperty('pluginId')) { // GitHub SVN feature https://docs.github.com/en/github/importing-your-projects-to-github/working-with-subversion-on-github/support-for-subversion-clients task pullPluginFromSvn(type: SvnCheckout) { - svnUrl = "https://github.com/apache/ofbiz-plugins/trunk/${pluginId}" + def currentBranch = getCurrentGitBranch() + svnUrl = "https://github.com/apache/ofbiz-plugins/" + currentBranch + "/${pluginId}" workspaceDir = "${pluginsDir}/${pluginId}" } dependsOn pullPluginFromSvn @@ -972,7 +977,8 @@ task pullAllPluginsSource(group: ofbizPlugin, } task pullPluginsFromSvn(type: SvnCheckout, dependsOn: deleteBeforePulling) { // GitHub SVN feature https://docs.github.com/en/github/importing-your-projects-to-github/working-with-subversion-on-github/support-for-subversion-clients - svnUrl = "https://github.com/apache/ofbiz-plugins/trunk" + def currentBranch = getCurrentGitBranch() + svnUrl = "https://github.com/apache/ofbiz-plugins/" + currentBranch workspaceDir = "${pluginsDir}" } dependsOn pullPluginsFromSvn