diff --git a/publish/do.groovy b/publish/do.groovy index 14286b9..e637e8f 100644 --- a/publish/do.groovy +++ b/publish/do.groovy @@ -41,14 +41,9 @@ def summaryappend(String summary) { summarystring += summary } -def guessreporoot(componentURL) { - if (!env.REPO_ROOT || env.REPO_ROOT.size() == 0) { - return '' - } +def guessreporootsuffix(componentURL) { def guess = componentURL.replaceFirst(/.*\/(.*).git/, '$1') - def reporoot = "${REPO_ROOT}/${guess}" - echo "Guessing reporoot is: ${reporoot}" - return reporoot + return guess } gh = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy") @@ -66,8 +61,8 @@ def getcomponentartifacts(releaseinfo, String repofolder, String tempfolder) { publishablePaths.add(publishableitem.filepath) summaryappend("${publishableitem.filepath},") } - def reporoot = guessreporoot(componentURL) - gh.gitCheckout(componentURL, revision, repofolder, reporoot, 1, true, publishablePaths) // Shallow clone + def reporootsuffix = guessreporootsuffix(componentURL) + gh.gitCheckout(componentURL, revision, reporootsuffix, reporoot, 1, true, publishablePaths) // Shallow clone } else { summaryappend("None ")