Add `gdk pristine` command
What does this Merge Request do?
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 thenbundle pristine
) - Ensures
gitlab/
Ruby gems are installed and pristine (bundle install
and thenbundle pristine
) - Ensures
gitaly/ruby
Ruby gems are installed and pristine (bundle install
and thenbundle pristine
) - Removes all files/directories in
gitlab/tmp/
(and then restores files as necessary) - Runs
yarn clean
ingitlab/
- 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