Jean28518 / linux-assistant

A daily linux helper with powerful integrated search, routines checks and administrative tasks. The Project is built with flutter and python.
https://www.linux-assistant.org
GNU General Public License v3.0
91 stars 12 forks source link

Add version info via command line switch #124

Closed Nati0ns closed 1 year ago

Nati0ns commented 1 year ago

This commit adds the possibility to display version information like so: print-version

This info is generated from the defined project information in CMakeLists.txt. Compiling the project generates the file config.h with the corresponding values.

closes #120

Best regards!

Jean28518 commented 1 year ago

Thank you very much for your contribution. Is there the option that we use the 'String CURRENT_LINUX_ASSISTANT_VERSION = "0.2.1";' in the main.dart file? I don't want to change too much version numbers for every new release :)

Nati0ns commented 1 year ago

I thought about using that as well. The thing is, if we print the version in main.dart the whole GTK application is already initialized and running at this point. My approach would circumvent this, but I've found no good way to set the value for this variable.

I think the optimal solution would be, to set the name, version and description in pubspec.yaml and read it all from there. Then we'd have one central file with all the necessary values.

But I don't have a working solution for that (yet).

Jean28518 commented 1 year ago

We should do this in the bash script, which calls linux_assistant. It is located under /linux-assistant