Fix 'make verify' command#655
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/cc @inteon |
Signed-off-by: Erik Godding Boye <egboye@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes make verify resolving the wrong project root (and potentially cd-ing outside the intended directory) by switching project root detection to Git’s notion of the repository top-level.
Changes:
- Replace path-based root discovery in
verify.shwithgit rev-parse --show-toplevel. - Ensure
verify.shoperates from the Git repository root regardless of where the script lives in the filesystem.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| set -o pipefail | ||
|
|
||
| projectdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../../.." && pwd )" | ||
| projectdir="$(git rev-parse --show-toplevel)" |
The
make verifycommand "escapes" the project directory when executed in the makefile-modules project. This is caused by the differences in folder structure in the source and consumer projects. Using git to resolve the project dir appears to work well.