Use FETCH_HEAD
for ref to get version files
What does this merge request do and why?
- When setting
gitlab.default_branch
to a commit SHA,rake update:tool-versions
fails - This MR changes tool version updater to use
git checkout FETCH_HEAD -- '*_VERSION'
which will handle both commit SHAs and branches.
Closes #3052 (closed)
How to set up and validate locally
Verify bug exists:
gdk config set gitlab.default_branch cd68dcd8707e8b719b4c52637ba82afd96b5f24e
gdk rake update:tool-versions
Checkout this MR
Verify update:tool-versions
works:
gdk config set gitlab.default_branch cd68dcd8707e8b719b4c52637ba82afd96b5f24e
gdk rake update:tool-versions
Impacted categories
The following categories relate to this merge request:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Merge request checklist
-
This MR references an issue describing the change. -
This change is backward compatible. If not, please include steps to communicate to our users. -
Tests added for new functionality. If not, please raise an issue to follow-up. -
Documentation added/updated, if needed. -
Announcement added, if change is notable. -
gdk doctor
test added, if needed.