You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2021/09/23 14:45:26 UTC
[sling-aggregator] branch master updated: add revision per project
(#4)
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-aggregator.git
The following commit(s) were added to refs/heads/master by this push:
new 9836cc8 add revision per project (#4)
9836cc8 is described below
commit 9836cc8a8e84ca2f98129e8184be07977cea2765
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Thu Sep 23 16:45:23 2021 +0200
add revision per project (#4)
---
collect-sling-repos.groovy | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/collect-sling-repos.groovy b/collect-sling-repos.groovy
index 121bfe6..b2371a0 100755
--- a/collect-sling-repos.groovy
+++ b/collect-sling-repos.groovy
@@ -85,19 +85,22 @@ groupMap = groupMap.findAll { it.value.size() > 1 }
groupMap.keySet().removeAll(groupsBlacklist)
// TODO - should we establish a hierarchical structure, e.g. group 'validation' projects in the same reactor?
+final DEFAULT_BRANCH = 'master'
def xml = new MarkupBuilder()
-xml.mkp.xmlDeclaration(version: "1.0", encoding: "utf-8")
+xml.setOmitNullAttributes(true)
+xml.mkp.xmlDeclaration(version: '1.0', encoding: 'utf-8')
xml.manifest() {
- mkp.comment("Generated by collect-sling-repos.groovy")
- remote(name: "origin", fetch: ".")
- "default" (revision: "master", remote: "origin")
+ mkp.comment('Generated by collect-sling-repos.groovy')
+ remote(name: 'origin', fetch: '.')
+ 'default'(revision: DEFAULT_BRANCH, remote: 'origin')
slingRepos.forEach { repo ->
def groups = getGroups(repo, groupMap)
+ def branch = (repo.default_branch != DEFAULT_BRANCH) ? repo.default_branch : null
if ( groups ) {
- project(path: repoPath(repo), name: "${repo.name}.git", description: "${repo.description}", groups: getGroups(repo, groupMap))
+ project(path: repoPath(repo), name: "${repo.name}.git", description: repo.description, groups: getGroups(repo, groupMap), revision: branch)
} else {
- project(path: repoPath(repo), name: "${repo.name}.git", description: "${repo.description}")
+ project(path: repoPath(repo), name: "${repo.name}.git", description: repo.description, revision: branch)
}
}
}