Perform a deep copy of version objects
This commit is contained in:
parent
b6c8034e22
commit
1bf6056e6c
1 changed files with 2 additions and 5 deletions
|
|
@ -161,11 +161,8 @@ String generate(meta, String sourcerevision, String sourcepath, String basebuild
|
|||
|
||||
String copyfrom(meta, othermeta) {
|
||||
// Deep copy
|
||||
def newgitinfo = othermeta.gitinfo.getClass().newInstance([othermeta.gitinfo])
|
||||
def newbuildstampinfo = othermeta.buildstampinfo.getClass().newInstance([othermeta.buildstampinfo])
|
||||
|
||||
meta.gitinfo = newgitinfo
|
||||
meta.buildstampinfo = newbuildstampinfo
|
||||
meta.gitinfo.set(othermeta.gitinfo.sourcepath, othermeta.gitinfo.sourcerevision, othermeta.gitinfo.gitrevision, othermeta.gitinfo.remoteurl, othermeta.gitinfo.remoteinfo)
|
||||
meta.buildstampinfo.set(othermeta.buildstampinfo.buildstampprefix, othermeta.buildstampinfo.revision, othermeta.buildstampinfo.buildstamp)
|
||||
|
||||
return meta.buildstampinfo.buildstamp
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue