Skip to content

Commit

Permalink
fix(docker): fix the src directory in docker/build.sh (#4894)
Browse files Browse the repository at this point in the history
Signed-off-by: Yutaka Kondo <[email protected]>
  • Loading branch information
youtalk authored Jun 20, 2024
1 parent ce3e912 commit ebd4fe7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,3 @@ capture/

# Node.js
node_modules/

# Docker build
docker/src
16 changes: 5 additions & 11 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ load_env() {
# Clone repositories
clone_repositories() {
cd "$WORKSPACE_ROOT"
if [ ! -d "docker/src" ]; then
mkdir -p docker/src
vcs import docker/src <autoware.repos
if [ ! -d "src" ]; then
mkdir -p src
vcs import src <autoware.repos
else
echo "Source directory already exists. Updating repositories..."
vcs import docker/src <autoware.repos
vcs pull docker/src
vcs import src <autoware.repos
vcs pull src
fi
}

Expand Down Expand Up @@ -140,11 +140,6 @@ build_images() {
set +x
}

# Remove temporary source directory
remove_tmp_src() {
rm -rf "$WORKSPACE_ROOT/docker/src"
}

# Remove dangling images
remove_dangling_images() {
docker image prune -f
Expand All @@ -159,5 +154,4 @@ set_arch_lib_dir
load_env
clone_repositories
build_images
remove_tmp_src
remove_dangling_images

0 comments on commit ebd4fe7

Please sign in to comment.