You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of documentation issue or suggestion
I made a fork of multipass and tried to build it using the instructions in the README.md. This failed on the cmake ../ step because forking the repository doesn't copy tags.
The issue is in the root CMakeLists.txt which contains the following lines
Since the forked repo has no tags, git describe --long doesn't return anything, and we get an error on line 156:
CMake Error at CMakeLists.txt:156 (string):
string sub-command REGEX, mode MATCH needs at least 5 arguments total to
command.
Proposal to fix issue or enact suggestion
Forking a repository and trying to build it seems like a common case, so I think it should be possible (without debugging the build process), but there could be two ways to support it:
A simple git fetch --tags https://github.com/canonical/multipass.git seems sufficient to pull the upstream tags into the forked repository, so the "Building" section in README.md could be expanded with something like:
If you're working on a forked repository:
cd <multipass>
git fetch --tags https://github.com/canonical/multipass.git
Alternatively the CMake process could probably be modified to ignore the version number if tags are not available or set it to some dummy value. But I'm not 100% sure since I don't know if it's being used for more than just setting the output of multipass --version.
Additional context
I could send a PR for either, but would like to know the maintainers preferred approach would be here.
The text was updated successfully, but these errors were encountered:
Hi @nielsreijers, AFAIK tags are not automatically forked. I think the correct solution would be to document the command to fetch the tags to the build document. We'll take care of that soon. Thanks for reporting!
Description of documentation issue or suggestion
I made a fork of multipass and tried to build it using the instructions in the README.md. This failed on the
cmake ../
step because forking the repository doesn't copy tags.The issue is in the root CMakeLists.txt which contains the following lines
Since the forked repo has no tags,
git describe --long
doesn't return anything, and we get an error on line 156:Proposal to fix issue or enact suggestion
Forking a repository and trying to build it seems like a common case, so I think it should be possible (without debugging the build process), but there could be two ways to support it:
git fetch --tags https://github.com/canonical/multipass.git
seems sufficient to pull the upstream tags into the forked repository, so the "Building" section in README.md could be expanded with something like:multipass --version
.Additional context
I could send a PR for either, but would like to know the maintainers preferred approach would be here.
The text was updated successfully, but these errors were encountered: