From 1a8f06bb7a89bf2aec1505f459b8e9b15224fd21 Mon Sep 17 00:00:00 2001 From: SuperQ Date: Sat, 1 Jul 2023 11:31:51 +0200 Subject: [PATCH] Update sync script. * Fix the path to the golanci-lint target filename. * Use the target filename when printing errors. * Put the yamllint filename back to previous name. Signed-off-by: SuperQ --- .yamllint.yml => .yamllint | 0 scripts/sync_repo_files.sh | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename .yamllint.yml => .yamllint (100%) diff --git a/.yamllint.yml b/.yamllint similarity index 100% rename from .yamllint.yml rename to .yamllint diff --git a/scripts/sync_repo_files.sh b/scripts/sync_repo_files.sh index 5e32eb883..d53ae8be7 100755 --- a/scripts/sync_repo_files.sh +++ b/scripts/sync_repo_files.sh @@ -125,11 +125,11 @@ process_repo() { fi target_filename="${source_file}" if [[ "${source_file}" == 'scripts/golangci-lint.yml' ]] ; then - target_filename=".github/workflows/${source_file}" + target_filename=".github/workflows/golangci-lint.yml" fi target_file="$(curl -sL --fail "https://raw.githubusercontent.com/${org_repo}/${default_branch}/${target_filename}")" if [[ -z "${target_file}" ]]; then - echo "${source_file} doesn't exist in ${org_repo}" + echo "${target_filename} doesn't exist in ${org_repo}" case "${source_file}" in CODE_OF_CONDUCT.md | SECURITY.md) echo "${source_file} missing in ${org_repo}, force updating." @@ -164,7 +164,7 @@ process_repo() { for source_file in "${needs_update[@]}"; do target_filename="${source_file}" if [[ "${source_file}" == 'scripts/golangci-lint.yml' ]] ; then - target_filename=".github/workflows/${source_file}" + target_filename=".github/workflows/golangci-lint.yml" fi case "${source_file}" in *) cp -f "${source_dir}/${source_file}" "./${target_filename}" ;;