diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2022-06-04 00:38:20 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2022-06-04 00:38:20 +0300 |
commit | 03faf2938dccea5472c3eea4467f0e15ef662eaa (patch) | |
tree | f061bc4d777104836464e48ea5d4f91879e6e098 | |
parent | 5fe9a91f0d793e1777fe408d9335766450defe57 (diff) | |
parent | 994993086f0a5c50257b8599927b63759a9cefd0 (diff) |
Merge branch 'eread/remove-scripts-for-checking-readmes' into 'main'
Remove scripts for checking READMEs that are no longer needed
See merge request gitlab-org/gitlab-docs!2756
-rw-r--r-- | Rakefile | 32 | ||||
-rw-r--r-- | content/_data/readmes.yaml | 2 | ||||
-rwxr-xr-x | scripts/check_symlinks.sh | 7 |
3 files changed, 0 insertions, 41 deletions
@@ -203,38 +203,6 @@ namespace :release do end end -desc 'Symlink READMEs' -task :symlink_readmes do - readmes = YAML.load_file('content/_data/readmes.yaml') - products.each_value do |product| - branch = retrieve_branch(product['slug']) - - # Limit the pipeline to pull only the repo where the MR is, not all 4, to save time/space. - # First we check if the branch on the docs repo is other than the default branch and - # then we skip if the remote branch variable is the default branch name. Finally, - # check if the pipeline was triggered via the API (multi-project pipeline) - # to exclude the case where we create a branch right off the gitlab-docs - # project. - next if ENV["CI_COMMIT_REF_NAME"] != ENV['CI_DEFAULT_BRANCH'] \ - && branch == ENV['CI_DEFAULT_BRANCH'] \ - && ENV["CI_PIPELINE_SOURCE"] == 'pipeline' - - next if readmes.key?(product['slug']) == false - - next if readmes.fetch(product['slug']).nil? - - readmes.fetch(product['slug']).each do |readme| - dirname = File.dirname(readme) - target = "#{dirname}/index.html" - - next if File.symlink?(target) - - puts "\n#{COLOR_CODE_GREEN}INFO: Symlinking to #{target}..#{COLOR_CODE_RESET}" - `ln -sf README.html #{target}` - end - end -end - desc 'Create the _redirects file' task :redirects do redirects_yaml = YAML.load_file('content/_data/redirects.yaml') diff --git a/content/_data/readmes.yaml b/content/_data/readmes.yaml deleted file mode 100644 index e4e297a1..00000000 --- a/content/_data/readmes.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -nothing: diff --git a/scripts/check_symlinks.sh b/scripts/check_symlinks.sh deleted file mode 100755 index 2f76892b..00000000 --- a/scripts/check_symlinks.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -bundle exec rake -T | grep symlink_readmes -if [ $? -eq 0 ] -then - bundle exec rake symlink_readmes -fi |