Add gitlab_branch parameter to one-line install script

Summary

The support/install one-line installation script should support specifying a GitLab branch to checkout during installation, assuming Add gitlab_branch parameter to gdk install (!5730 - merged) gets merged.

Current behavior

The one-line install script accepts:

  • Arg 1: GDK install directory (default: gdk)
  • Arg 2: GDK branch to checkout (default: main)
  • Arg 3: Enable telemetry (default: false)

It then calls gdk install with only gitlab_repo and telemetry_enabled:

mise exec -- gdk install gitlab_repo="$GITLAB_REPO_URL" telemetry_enabled="$ENABLE_TELEMETRY"

Proposed behavior

Add a 4th argument (or environment variable) for the GitLab branch:

# Example with positional arg
curl "https://gitlab.com/.../support/install" | bash -s gdk main false my-feature-branch

# Or with environment variable
GITLAB_BRANCH=my-feature-branch curl "https://gitlab.com/.../support/install" | bash

The script would then pass this to gdk install:

mise exec -- gdk install gitlab_repo="$GITLAB_REPO_URL" gitlab_branch="$GITLAB_BRANCH" telemetry_enabled="$ENABLE_TELEMETRY"

Why

This enables users to install GDK with a specific GitLab branch from the start using the one-line installer, avoiding the need to run gdk switch afterward (which re-runs migrations and setup steps).

Edited by Michael Kozono