Skip to content

Commit

Permalink
Don't remove yugabyte-bash-common when performing a clean build
Browse files Browse the repository at this point in the history
Summary:
Don't remove yugabyte-bash-common when performing a clean build.
We were removing the entire build directory when doing a clean-all build, which also
removed yugabyte-bash-common which is already been sourced into the current bash context.
It isn't possible to modify yugabyte-bash-common during a build, it can only be sourced once.
So don't delete it when cleaning the build env.

Test Plan:
jenkins
Ran `yb_build.sh --clean-all` multiple times to ensure everything except yugabyte-bash-common is
deleted.

Reviewers: devops, steve.varnau

Reviewed By: steve.varnau

Subscribers: devops

Differential Revision: https://phorge.dev.yugabyte.com/D40151
  • Loading branch information
jharveysmith committed Nov 20, 2024
1 parent 0d21e54 commit 6ad0081
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion yb_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,8 @@ fi

if [[ ${remove_entire_build_dir_before_build} == "true" ]]; then
log "Removing the entire ${YB_SRC_ROOT}/build directory (--clean-all specified)"
( set -x; rm -rf "${YB_SRC_ROOT}/build" )
( set -x; find "${YB_SRC_ROOT}/build" -maxdepth 1 -mindepth 1 \
! -name "yugabyte-bash-common" -exec rm -rf {} \; )
save_paths_and_archive_urls_to_build_dir
elif [[ ${remove_build_root_before_build} == "true" ]]; then
log "Removing '$BUILD_ROOT' (--clean specified)"
Expand Down

0 comments on commit 6ad0081

Please sign in to comment.