pcdshub / tc-release

A TwinCAT project release tool
https://confluence.slac.stanford.edu/display/PCDS/Releasing+Pytmc+TwinCAT+Project+IOCs
Other
4 stars 4 forks source link

Version number to EPICS via pytmc #5

Open klauer opened 5 years ago

klauer commented 5 years ago

What is the process to ensure that the library version number is readable in EPICS (presumably starting with the usage of pytmc pragmas)?

klauer commented 4 years ago

We can pragma the GVL in the released library. Perhaps it should be prefixed by something like $(IOC):Versions:LibraryName? (@ZLLentz @slacAWallace ?)

ZLLentz commented 4 years ago

I'm happy to pragma the released library GVLs. Does that propagate to the released library? I'll check really quick because I need to do a re-release of one of my libs.

klauer commented 4 years ago

Also related: https://github.com/slaclab/pytmc/issues/132

ZLLentz commented 4 years ago

The version is actually stored in a struct. Is there a way to pytmc one element of a struct? (In this case, the sVersion attribute)

klauer commented 4 years ago

(side-note: pytmc pragma @(IOC):ProjectVersion (@ -> $ conversion happens in pytmc) in the GVL)

ZLLentz commented 4 years ago

If we wait until tc_release to inject this pragma, the tmc file does not get rebuilt before the tag. We need to do it earlier.

klauer commented 4 years ago

That's absolutely correct. Back to the drawing board...