Adjust crew update command's fixup usage. (#12118)

* Adjust crew update command.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* fixup

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

---------

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
Satadru Pramanik, DO, MPH, MEng
2025-06-28 12:42:19 -04:00
committed by GitHub
parent 663d280d9f
commit 723cfbf1be
3 changed files with 20 additions and 54 deletions

View File

@@ -246,13 +246,11 @@ def update
GIT_REPAIR_COMMANDS
end
system(<<~GIT_UPDATE_COMMANDS, chdir: CREW_LIB_PATH, exception: true)
## Update crew from git.
# Set sparse-checkout folders.
git sparse-checkout set packages manifest/#{ARCH} lib commands bin crew tests tools
git sparse-checkout reapply
git fetch #{CREW_REPO} #{CREW_BRANCH}
GIT_UPDATE_COMMANDS
## Update crew from git.
# Set sparse-checkout folders.
system "git sparse-checkout set packages manifest/#{ARCH} lib commands bin crew tests tools", chdir: CREW_LIB_PATH, exception: true
system 'git sparse-checkout reapply', chdir: CREW_LIB_PATH, exception: true
system "git fetch #{CREW_REPO} #{CREW_BRANCH}", chdir: CREW_LIB_PATH, exception: true
# Now that we've fetched all the new changes, see if lib/const.rb was changed.
# We do this before resetting to FETCH_HEAD because we lose the original HEAD when doing so.
to_update = `cd #{CREW_LIB_PATH} && git show --name-only HEAD..FETCH_HEAD`.include?('lib/const.rb')