Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Provide a way to give the versions of all the Tango classes involved in a device server #10

Closed
bourtemb opened this issue Jan 26, 2018 · 1 comment

Comments

@bourtemb
Copy link
Member

It would be useful to provide a way to see the revision-release-version number of each device class of a Device Server.
It would be good to have a way to get this information remotely while the device server is running and to get it as well when executing the device server with --version option without instance name provided.
Some discussions will have to take place in order to decide on the best way to expose this information and on the data type used to return this information.
Some work might have to be done on POGO to implement a standard way to specify the revision number of each class (new generated file which will be edited by the user to update the version number, special target on the (C)Makefiles to create a new release of the class, ...).

@Ingvord
Copy link
Member

Ingvord commented Feb 20, 2018

This can be easily done using CMake for C++ device classes - we just need to configure corresponding header file, for instance as in this PR. Once version is in header file it can be easily exported via an attribute.

For Java standard code snippet can be used to extract relevant data from Manifest file, for instance:

@Attribute(name = "implementation_version")
public String getImplementationVersion(){
    TangoRestServer.class.getPackage().getImplementationVersion();
}

The version can be added to the Manifest using e.g. Maven, in pom.xml:

<!-- ... -->
<archive>
  <manifest>
    <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
    <mainClass>org.tango.TangoRestServer</mainClass>
  </manifest>
  </archive>

Not sure about Python though... we should ask experts.

Concerning the data type I vote for String as version might be quite complex e.g. "v0.3-rc1"

And since this is quite simple this feature can be added even to Tango v9 (just promoting minor version)

@t-b t-b closed this as completed Apr 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants