From 3699bdd65003b1443c5f130de7de2153d2e1da44 Mon Sep 17 00:00:00 2001 From: Masaya Suzuki Date: Mon, 16 Dec 2024 20:34:01 +0900 Subject: [PATCH] =?UTF-8?q?CI=20pr-copy-ci-sudden-death:=20scripts?= =?UTF-8?q?=E3=82=B3=E3=83=94=E3=83=BC=E5=89=8D=E3=81=AB=E5=89=8A=E9=99=A4?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/pr_copy_ci_sudden_death/pr_copy_ci/copy_ci.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/pr_copy_ci_sudden_death/pr_copy_ci/copy_ci.sh b/scripts/pr_copy_ci_sudden_death/pr_copy_ci/copy_ci.sh index b1d666c11..1b388afda 100755 --- a/scripts/pr_copy_ci_sudden_death/pr_copy_ci/copy_ci.sh +++ b/scripts/pr_copy_ci_sudden_death/pr_copy_ci/copy_ci.sh @@ -9,7 +9,9 @@ for f in $(find hato-bot/${workflows_path} -type f \ -not -name "*hato-bot.yml" | sed -e "s:hato-bot/${workflows_path}/::g"); do yq '(.jobs.*.steps.[] | select(has("with")).with | select(has("repo-name")).repo-name) = "dev-hato/sudden-death"' "hato-bot/${workflows_path}/${f}" >"sudden-death/${workflows_path}/${f}" done - +for f in $(find sudden-death/scripts -type f | grep -v sudden_death); do + rm -rf "$f" +done for f in $(find hato-bot/scripts -type f | grep -v hato_bot | sed -e "s:hato-bot/::g"); do mkdir -p "sudden-death/$(dirname "${f}")" rm -rf "sudden-death/${f}"