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

version-check should attempt to read F´ version if ran in a project #2996

Open
thomas-bc opened this issue Oct 29, 2024 · 2 comments
Open
Labels
enhancement F´ Tools Issues pertaining to the F´ tools help wanted

Comments

@thomas-bc
Copy link
Collaborator

F´ Version v3.5
Affected Component

Feature Description

fprime-util version-check was built so that it doesn't require to be in a project to be ran. It simply prints out a bunch of things, without trying to load the build/project.
This has the downside that we can't read the F´ version, since this requires to load project information. But it does have the advantage of being runnable anywhere, and not just within an fprime project.

It would be nice if we could read the F´ version nonetheless. We could either:

  • attempt to load the project/build-cache, if that doesn't work, skip the load and don't print F´ version
  • more rudimentary, simply look into ./fprime ./lib/fprime and other common locations if there exists a .git repo
@thomas-bc thomas-bc added enhancement F´ Tools Issues pertaining to the F´ tools labels Oct 29, 2024
@Kronos3
Copy link
Contributor

Kronos3 commented Oct 30, 2024

You could use git submodule to list out submodules to select the proper fprime submodule. Something like:

$ git submodule foreach 'git remote get-url origin && git describe --tags --always'
Entering 'fprime'
[email protected]:nasa/fprime.git
v3.4.3-24-gff16e1821

@thomas-bc
Copy link
Collaborator Author

Thanks @Kronos3 - that does seem like the ideal solution here, so we can still skip the build-loading step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement F´ Tools Issues pertaining to the F´ tools help wanted
Projects
None yet
Development

No branches or pull requests

2 participants