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

Merged
merged 5 commits into from
Dec 18, 2024
Merged

Automatic gui version #3806

merged 5 commits into from
Dec 18, 2024

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 (7074116) to head (8c24637).
Report is 6 commits behind head on main.

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

☔ 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
ricab
ricab previously approved these changes Dec 13, 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.

Approving on the same grounds as on the other side.

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Contributor

@sharder996 sharder996 left a comment

Choose a reason for hiding this comment

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

LGTM

@sharder996 sharder996 enabled auto-merge December 18, 2024 04:19
@sharder996 sharder996 added this pull request to the merge queue Dec 18, 2024
Merged via the queue into main with commit 25a6647 Dec 18, 2024
14 checks passed
@sharder996 sharder996 deleted the automatic-gui-version branch December 18, 2024 07:27
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