Fix source path for rake task
What does this MR do and why?
Follow-on from !3114 (merged)
Rake tasks were moved in !2975 (merged), which changed the directory the task uses.
When running the redirects.rake task locally, I got the following error:
warning: could not open directory 'lib/tasks/content/_data/': No such file or directory
fatal: pathspec '/Users/katipaizee/gitlab-docs/lib/tasks/content/_data/redirects.yaml' did not match any files
This MR fixes source_dir
so it gets the absolute path of the root directory of gitlab-docs
and not the directory the Rake file is located in.
Related to technical-writing#675 (closed)
How to set up and validate locally
Check out this branch and run the dry run version of the redirects task (so it doesn't push your branch or create any MRs):
SKIP_MR=true bundle exec rake docs:clean_redirects
Note that it will create a docs-clean-redirects-2022-xx
branch in all your doc projects and commit the changes, but won't push.
Merge request acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this merge request.