docs: record landed historian upgrade and support migrated replays
This commit is contained in:
@@ -61,7 +61,16 @@ metadata = {'utc':datetime.datetime.now(datetime.timezone.utc).isoformat(),'cons
|
||||
(out/'metadata.json').write_text(json.dumps(metadata,indent=2))
|
||||
consumer = out/'consumer'; archive(root,sha,consumer)
|
||||
subprocess.run(['git','init','-q',str(consumer)],check=True)
|
||||
subprocess.run(['git','-C',str(consumer),'apply',str(patch)],check=True)
|
||||
check = subprocess.run(['git','-C',str(consumer),'apply','--check',str(patch)],capture_output=True,text=True)
|
||||
if check.returncode == 0:
|
||||
subprocess.run(['git','-C',str(consumer),'apply',str(patch)],check=True)
|
||||
metadata['consumer_patch_state'] = 'applied-to-archive'
|
||||
else:
|
||||
reverse = subprocess.run(['git','-C',str(consumer),'apply','--reverse','--check',str(patch)],capture_output=True,text=True)
|
||||
if reverse.returncode:
|
||||
raise RuntimeError('Consumer neither accepts the migration patch nor contains it completely: ' + check.stderr)
|
||||
metadata['consumer_patch_state'] = 'already-present-in-consumer'
|
||||
|
||||
if not published:
|
||||
hg = out/'historiangw-source'; archive(a.hg_root,hg_sha,hg)
|
||||
adapter = consumer/'src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway.csproj'
|
||||
|
||||
Reference in New Issue
Block a user