Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get version informations from within the ODK image. #1011

Merged
merged 4 commits into from
Feb 29, 2024

Conversation

gouttegd
Copy link
Contributor

This PR:

  1. adds a odk-info tool inside the ODK image, that shows the version of the image (baked in at build time) and optionally the versions of the most important tools and the Python packages;

  2. amends the odkversion Makefile goal to show both the version of the ODK that generated the Makefile (“ODK Makefile”, as baked into the Makefile as seed time) and the version of the ODK that is currently running (“ODK Image”), as well as the version of the main tools (obtained from the odk-info script).

addresses #791 (apart from the "link to documentation" bit, which I believe is overkill anyway).

With this PR, this is what the odkversion output looks like:

$ sh run.sh make odkversion
ODK Makefile v1.5
ODK Image v1.5
ROBOT version 1.9.5
Ammonite REPL & Script-Runner, 2.5.9
DOSDP-Tools v0.19.3, scalaVersion: 2.13.8, sbtVersion: 1.6.2, gitCommit: 943fbcac7c4c6a3f76ff7e3625628f714c6eb6ad
Konclude v0.7.0-1138 - 500e11d9 (Jun 19 2021)
Jena v4.9.0
Relation-Graph v2.3.2, scalaVersion: 2.13.12, sbtVersion: 1.9.7, gitCommit: ee8b19f4b8a3b8316c2b19c33efa9459013973ee
Ontology Access Kit v0.5.25

This commit:

1) adds a odk-info tool inside the ODK image, that shows the version of
   the image (baked in at build time) and optionally the versions of the
   most important tools and the Python packages;

2) amends the `odkversion` Makefile goal to show both the version of the
   ODK that generated the Makefile ("ODK Makefile") *and* the version of
   the ODK that is currently running ("ODK Image"), as well as the
   version of the main tools (using the odk-info script).

addresses #791 (apart from the "link to documentation" bit, which I
believe is overkill anyway).
@gouttegd gouttegd self-assigned this Feb 28, 2024
matentzn
matentzn previously approved these changes Feb 29, 2024
Copy link
Contributor

@matentzn matentzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is so cool!

Assuming you tested running make odkversion after a test build, please merge!

@gouttegd
Copy link
Contributor Author

I want to amend the odk-info script first to fix a potential issue (the script can be stuck in an infinite loop if it is called with an unexpected argument).

Calling the odk-info script with a non-empty argument that does not
match any of the three options it expects will get it stuck in an
infinite loop. We need to catch any unexpected argument to avoid that.
Some of the tools for which we display version informations have rather
lengthy version messages (especially the Scala-based tools), so we cut
them down to just the version number.
Copy link
Contributor

@matentzn matentzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@gouttegd gouttegd merged commit 380e725 into master Feb 29, 2024
1 check passed
@gouttegd gouttegd deleted the add-odkinfo-script branch February 29, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants