mirror of
https://github.com/prometheus/prometheus
synced 2025-01-11 17:19:45 +00:00
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 <superq@gmail.com>
This commit is contained in:
parent
031d22df9e
commit
1a8f06bb7a
@ -125,11 +125,11 @@ process_repo() {
|
|||||||
fi
|
fi
|
||||||
target_filename="${source_file}"
|
target_filename="${source_file}"
|
||||||
if [[ "${source_file}" == 'scripts/golangci-lint.yml' ]] ; then
|
if [[ "${source_file}" == 'scripts/golangci-lint.yml' ]] ; then
|
||||||
target_filename=".github/workflows/${source_file}"
|
target_filename=".github/workflows/golangci-lint.yml"
|
||||||
fi
|
fi
|
||||||
target_file="$(curl -sL --fail "https://raw.githubusercontent.com/${org_repo}/${default_branch}/${target_filename}")"
|
target_file="$(curl -sL --fail "https://raw.githubusercontent.com/${org_repo}/${default_branch}/${target_filename}")"
|
||||||
if [[ -z "${target_file}" ]]; then
|
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
|
case "${source_file}" in
|
||||||
CODE_OF_CONDUCT.md | SECURITY.md)
|
CODE_OF_CONDUCT.md | SECURITY.md)
|
||||||
echo "${source_file} missing in ${org_repo}, force updating."
|
echo "${source_file} missing in ${org_repo}, force updating."
|
||||||
@ -164,7 +164,7 @@ process_repo() {
|
|||||||
for source_file in "${needs_update[@]}"; do
|
for source_file in "${needs_update[@]}"; do
|
||||||
target_filename="${source_file}"
|
target_filename="${source_file}"
|
||||||
if [[ "${source_file}" == 'scripts/golangci-lint.yml' ]] ; then
|
if [[ "${source_file}" == 'scripts/golangci-lint.yml' ]] ; then
|
||||||
target_filename=".github/workflows/${source_file}"
|
target_filename=".github/workflows/golangci-lint.yml"
|
||||||
fi
|
fi
|
||||||
case "${source_file}" in
|
case "${source_file}" in
|
||||||
*) cp -f "${source_dir}/${source_file}" "./${target_filename}" ;;
|
*) cp -f "${source_dir}/${source_file}" "./${target_filename}" ;;
|
||||||
|
Loading…
Reference in New Issue
Block a user