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 3 commits into
base: main
Choose a base branch
from
Open

Automatic gui version #3806

wants to merge 3 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.

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!

@@ -29,7 +29,7 @@ set(MULTIPASS_GUI_EXECUTABLE_FULL_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MULTI

file(GLOB_RECURSE MULTIPASS_GUI_SOURCE_FILES ${MULTIPASS_GUI_SOURCE_DIR}/lib/*.dart)

set(FLUTTER_BUILD_ARGS --release --suppress-analytics --verbose)
set(FLUTTER_BUILD_ARGS --release --suppress-analytics --verbose --build-name=${MULTIPASS_VERSION})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't we split between build name and number?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, yes we should!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the --build-number can only contain digits, I made it so that only the digits are extracted from the version string. So from 1.15.0-..., all the digits are extracted. If there are none, it defaults to 0. This already happens by default on macOS, so I made it the same on all platforms.

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 (f01004e) to head (5732634).

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.

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