Skip to content

Fix / clean up repo-docker-run.sh #3654

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

Merged
merged 5 commits into from
Apr 22, 2025
Merged

Fix / clean up repo-docker-run.sh #3654

merged 5 commits into from
Apr 22, 2025

Conversation

michi-covalent
Copy link
Contributor

probably easier to review commit by commit.

Some readlink implementations (like the that comes with Mac) doesn't
support -e flag. This script already uses the realpath command, so let's
use that everywhere.

Signed-off-by: Michi Mutsuzaki <[email protected]>
The top-level directory is two levels up.

Signed-off-by: Michi Mutsuzaki <[email protected]>
In my environment "make -C api" fails depending on timing with this
error:

    buf breaking /src/api --against "/src/api/../.git#branch=origin/main,subdir=api/v1"
    Failure: could not clone file:///src/.git: exit status 128
    fatal: detected dubious ownership in repository at '/src/.git'
    To add an exception for this directory, call:

            git config --global --add safe.directory /src/.git
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

    make: Leaving directory '/src/api'
    make: *** [Makefile:30: __check-breaking_local] Error 1
    make: *** [all] Error 2

Update repo-docker-run.sh to check if it's in the main git working copy
before mounting .git. This script doesn't need to mount .git directory
separately if it's already running in the main git working copy since it
will be in the main volume mount under /src/.

Signed-off-by: Michi Mutsuzaki <[email protected]>
For those people who don't have docker installed.

Signed-off-by: Michi Mutsuzaki <[email protected]>
Don't pass --rm and --user flags to repo-docker-run.sh. The script sets
these flags.

Signed-off-by: Michi Mutsuzaki <[email protected]>
@michi-covalent michi-covalent added the release-note/misc This PR makes changes that have no direct user impact. label Apr 20, 2025
@michi-covalent michi-covalent marked this pull request as ready for review April 21, 2025 02:43
@michi-covalent michi-covalent requested a review from a team as a code owner April 21, 2025 02:43
@mtardy mtardy merged commit 01d7724 into main Apr 22, 2025
43 of 44 checks passed
@mtardy mtardy deleted the pr/michi/infinite-bash branch April 22, 2025 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants