From 10ef34a8c1f386d3d0e616681dcf6563d4898fbd Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 11 Jun 2024 11:44:19 +0100 Subject: [PATCH] actions/sync: fix copying of `vale.ini` files. The location was previously incorrect. --- .github/actions/sync/shared-config.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/actions/sync/shared-config.rb b/.github/actions/sync/shared-config.rb index 4f082c37..c8a510bc 100755 --- a/.github/actions/sync/shared-config.rb +++ b/.github/actions/sync/shared-config.rb @@ -44,6 +44,7 @@ def git(*args) key.match?(%r{\Arequire|inherit_from|inherit_mode|Cask/|Formula|Homebrew|Performance/|RSpec|Sorbet/}) end.to_yaml homebrew_docs_workflow_yaml = homebrew_repository_path/docs_workflow_yaml +homebrew_vale_ini = homebrew_repository_path/vale_ini dependabot_config_yaml = YAML.load_file(dependabot_yaml) dependabot_config_yaml["updates"].select! do |update| @@ -124,7 +125,7 @@ def git(*args) target_docs_path.dirname.mkpath FileUtils.cp docs_path, target_docs_path end - when docs_workflow_yaml, vale_ini + when docs_workflow_yaml next if custom_docs_repos.include?(repository_name) docs_path = target_directory_path/docs @@ -132,6 +133,14 @@ def git(*args) next unless docs_path.directory? FileUtils.cp homebrew_docs_workflow_yaml, target_path + when vale_ini + next if custom_docs_repos.include?(repository_name) + + docs_path = target_directory_path/docs + next unless docs_path.exist? + next unless docs_path.directory? + + FileUtils.cp homebrew_vale_ini, target_path when ruby_version next if custom_ruby_version_repos.include?(repository_name)