Build up a tag map
This commit is contained in:
parent
fb72031c97
commit
3dbdf85dfa
1 changed files with 5 additions and 2 deletions
|
|
@ -41,12 +41,15 @@ LinkedHashMap<String, ArrayList<String>> getremoteshatagmap(String repositoryURL
|
||||||
|
|
||||||
LinkedHashMap<String, ArrayList<String>> shatagmap = new LinkedHashMap<String, ArrayList<String>>()
|
LinkedHashMap<String, ArrayList<String>> shatagmap = new LinkedHashMap<String, ArrayList<String>>()
|
||||||
for (shatag in shataglist) {
|
for (shatag in shataglist) {
|
||||||
echo "shatag: ${shatag}"
|
|
||||||
def shatagfields = shatag.split('\\t')
|
def shatagfields = shatag.split('\\t')
|
||||||
def sha = shatagfields[0].trim()
|
def sha = shatagfields[0].trim()
|
||||||
def tag = shatagfields[1].trim()
|
def tag = shatagfields[1].trim()
|
||||||
echo "sha: ${sha} tag: ${tag}"
|
echo "sha: ${sha} tag: ${tag}"
|
||||||
shatagmap[sha].add(tag)
|
if (shatagmap.get(sha) == null) {
|
||||||
|
shatagmap.put(sha, [tag])
|
||||||
|
} else {
|
||||||
|
shatagmap.put(sha, shatagmap.get(sha).add(tag))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return shatagmap
|
return shatagmap
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue