Allow installing GDK with a specific GitLab branch
Summary
Add a gitlab_branch parameter to the gdk install command that allows specifying a GitLab branch to checkout during installation.
Usage
gdk install gitlab_branch=my-feature-branchOr via gdk.yml:
gitlab:
clone_branch: my-feature-branchWhy
When setting up GDK for development on a specific feature branch, the current workflow is:
gdk install(clones and sets up master)gdk switch my-branch(switches branch, re-runs migrations, etc.)
This is inefficient because:
- Migrations run twice (once for master, once for the branch)
- Extra time spent on setup steps that need to be redone
With this change, the GitLab repository will be cloned and immediately checked out to the specified branch before any setup steps run.
Implementation
- Add
gitlab.clone_branchconfig setting (empty by default, meaning master) - Add
gitlab_branchparameter parsing inlib/gdk/command/install.rb - Translate
gitlab_branch=Xtogitlab_clone_branch=Xfor Make - Update
Makefile.gitlab.mkto useGIT_REVISIONwhen cloning - Add documentation differentiating from
gitlab.default_branch(which is used bygdk updateandgdk switch)
Related
- !5730 (merged) - Implementation MR
- #3238 (closed) - Follow-up to add this to the one-line install script
- #644 (closed) - Original request (closed, led to
gdk switch)