Skip to content

Add `gdk pristine` command

Ash McKenzie requested to merge 843-introduce-gdk-pristine-command into master

What does this Merge Request do?

This MR relies upon !1845 (merged) (and !1844 (merged)).

This MR introduces the gdk pristine command which does the following:

  • Removes all files/directories in GDK tmp/ (and then restores files as necessary)
  • Runs go clean -cache
  • Ensures GDK Ruby gems are installed and pristine (bundle install and then bundle pristine)
  • Ensures gitlab/ Ruby gems are installed and pristine (bundle install and then bundle pristine)
  • Ensures gitaly/ruby Ruby gems are installed and pristine (bundle install and then bundle pristine)
  • Removes all files/directories in gitlab/tmp/ (and then restores files as necessary)
  • Runs yarn clean in gitlab/
  • Adds suggestion to run gdk pristine if something goes wrong

Once !1174 (merged) is merged, I'll include running this too and look to combine the too into simply gdk pristine. 🙂

Example output:

$ gdk pristine
=> Cleaning GDK tmp/ ..
=> Cleaning go cache..
=> Ensuring GDK Ruby gems are installed and pristine..
--snip--
=> Ensuring gitlab/ Ruby gems are installed and pristine..
--snip--
=> Ensuring gitaly/ruby/ Ruby gems are installed and pristine..
--snip--
=> Cleaning gitlab/tmp/ ..
=> Cleaning gitlab/ Yarn cache..
--snip--
Successfully ran 'gdk pristine'!

Closes #843 (closed) #1139 (closed)

Merge Request checklist

  • Tests added for new functionality. If not, please raise Issue to follow-up.
  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Documentation added/updated, if needed.
  • gdk doctor test added, if needed.
Edited by Ash McKenzie

Merge request reports