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

Automatic gui version #3806

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Automatic gui version #3806

wants to merge 4 commits into from

Conversation

andrei-toterman
Copy link
Contributor

@andrei-toterman andrei-toterman commented Dec 3, 2024

Set the GUI version using the --build-name and --build-number args, using the MULTIPASS_VERSION CMake var. This way, we don't have to manually update the version all the time.
For the --build-number, the argument must only contain digits, so we extract the digits out of the commit hash respective to the current version.

MULTI-1702

Copy link
Collaborator

@ricab ricab left a comment

Choose a reason for hiding this comment

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

Thank you @andrei-toterman!

src/client/gui/CMakeLists.txt.linux Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.94%. Comparing base (c3ff915) to head (706cc87).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3806      +/-   ##
==========================================
- Coverage   88.95%   88.94%   -0.01%     
==========================================
  Files         256      256              
  Lines       14584    14584              
==========================================
- Hits        12973    12972       -1     
- Misses       1611     1612       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andrei-toterman andrei-toterman requested a review from ricab December 4, 2024 16:32
@andrei-toterman andrei-toterman marked this pull request as draft December 5, 2024 21:11
@andrei-toterman andrei-toterman marked this pull request as ready for review December 5, 2024 21:11
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
@andrei-toterman andrei-toterman added jira Create a Jira ticket for this issue and removed jira Create a Jira ticket for this issue labels Dec 11, 2024
Copy link
Collaborator

@ricab ricab left a comment

Choose a reason for hiding this comment

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

Hey Andrei. The approach looks solid. Just a couple things inline.

CMakeLists.txt Show resolved Hide resolved
else()
message(FATAL_ERROR "Invalid tag detected: ${NEW_VERSION}")
endif()

Copy link
Collaborator

Choose a reason for hiding this comment

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

This whole block could be run as a separate step, right? Could we have a separate function for it instead, and call it only where relevant (i.e. Flutter build, possibly MSI stuff later)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't be sure what you are referring to, because GitHub shows you highlighted only an empty line, but I guess you mean this whole new algorithm for extracting those two version components. And yes, we could definitely move it to a new function and call it only in the GUI cmake file.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, that is what I meant. Should have been clearer. BTW, I like that you are printing the vars that are getting derived. It would be nice if you could keep that.

@andrei-toterman andrei-toterman linked an issue Dec 13, 2024 that may be closed by this pull request
Copy link
Collaborator

@ricab ricab left a comment

Choose a reason for hiding this comment

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

Approving on the same grounds as on the other side.

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.

Derive GUI version from build directly
3 participants