From e8245d8705693f47fb473f6daf51e2b1e29d8c30 Mon Sep 17 00:00:00 2001 From: plastikfan Date: Thu, 28 Nov 2024 23:37:56 +0000 Subject: [PATCH] chore: update auto check (#276) --- scripts/automate-checklist.sh | 42 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/scripts/automate-checklist.sh b/scripts/automate-checklist.sh index c60f2c7..488588c 100644 --- a/scripts/automate-checklist.sh +++ b/scripts/automate-checklist.sh @@ -21,12 +21,12 @@ function auto-check() { fi - if ! update-astrolib-in-taskfile "$repo" "$owner"; then + if ! update-arcadia-in-taskfile "$repo" "$owner"; then return 1 fi - if ! update-astrolib-in-goreleaser "$repo" "$owner"; then + if ! update-arcadia-in-goreleaser "$repo" "$owner"; then return 1 fi @@ -130,7 +130,7 @@ function update-mod-file() { local owner=$2 local folder=./ local file_pattern=go.mod - local target="module github.com\/snivilised\/astrolib" + local target="module github.com\/snivilised\/arcadia" local replacement="module github.com\/$owner\/$repo" update-all-generic "update-mod-file" "$repo" "$owner" "$folder" "$file_pattern" "$target" "$replacement" } @@ -140,20 +140,20 @@ function update-source-id-variable-in-translate-defs() { local owner=$2 local folder=./i18n/ local file_pattern=translate-defs.go - local target="AstrolibSourceID" + local target="ArcadiaSourceID" tc_repo=$(echo "${repo:0:1}" | tr '[:lower:]' '[:upper:]')${repo:1} local replacement="${tc_repo}SourceID" update-all-generic "update-source-id-variable-in-translate-defs" "$repo" "$owner" "$folder" "$file_pattern" "$target" "$replacement" } -function update-astrolib-in-taskfile() { +function update-arcadia-in-taskfile() { local repo=$1 local owner=$2 local folder=./ local file_pattern=Taskfile.yml - local target=astrolib + local target=arcadia local replacement=$repo - update-all-generic "update-astrolib-in-taskfile" "$repo" "$owner" "$folder" "$file_pattern" "$target" "$replacement" + update-all-generic "update-arcadia-in-taskfile" "$repo" "$owner" "$folder" "$file_pattern" "$target" "$replacement" } function update-workflow-names() { @@ -161,20 +161,20 @@ function update-workflow-names() { local owner=$2 local folder=.github/workflows local file_pattern="*.yml" - local target="name: Astrolib" + local target="name: Arcadia" tc_repo=$(echo "${repo:0:1}" | tr '[:lower:]' '[:upper:]')${repo:1} local replacement="name: $tc_repo" update-all-generic "💥 update-workflow-names" "$repo" "$owner" "$folder" "$file_pattern" "$target" "$replacement" } -function update-astrolib-in-goreleaser() { +function update-arcadia-in-goreleaser() { local repo=$1 local owner=$2 local folder=./ local file_pattern=.goreleaser.yaml - local target=astrolib + local target=arcadia local replacement=$repo - update-all-generic "update-astrolib-in-goreleaser" "$repo" "$owner" "$folder" "$file_pattern" "$target" "$replacement" + update-all-generic "update-arcadia-in-goreleaser" "$repo" "$owner" "$folder" "$file_pattern" "$target" "$replacement" } function rename-templ-data-id() { @@ -182,7 +182,7 @@ function rename-templ-data-id() { local owner=$2 local folder=./ local file_pattern="*.go" - local target="astrolibTemplData" + local target="arcadiaTemplData" local replacement="${repo}TemplData" update-all-generic "rename-templ-data-id" "$repo" "$owner" "$folder" "$file_pattern" "$target" "$replacement" } @@ -192,26 +192,26 @@ function update-readme() { local owner=$2 local folder=./ local file_pattern=README.md - local target="astrolib: " + local target="arcadia: " local replacement="${repo}: " - if ! update-all-generic "update-readme(astrolib:)" "$repo" "$owner" "$folder" "$file_pattern" "$target" "$replacement"; then + if ! update-all-generic "update-readme(arcadia:)" "$repo" "$owner" "$folder" "$file_pattern" "$target" "$replacement"; then return 1 fi - target="snivilised\/astrolib" + target="snivilised\/arcadia" replacement="$owner\/$repo" - if ! update-all-generic "update-readme(snivilised/astrolib)" "$repo" "$owner" "$folder" "$file_pattern" "$target" "$replacement"; then + if ! update-all-generic "update-readme(snivilised/arcadia)" "$repo" "$owner" "$folder" "$file_pattern" "$target" "$replacement"; then return 1 fi - target="astrolib Continuous Integration" + target="arcadia Continuous Integration" tc_repo=$(echo "${repo:0:1}" | tr '[:lower:]' '[:upper:]')${repo:1} replacement="$tc_repo Continuous Integration" - if ! update-all-generic "update-readme(astrolib Continuous Integration)" "$repo" "$owner" "$folder" "$file_pattern" "$target" "$replacement"; then + if ! update-all-generic "update-readme(arcadia Continuous Integration)" "$repo" "$owner" "$folder" "$file_pattern" "$target" "$replacement"; then return 1 fi @@ -223,16 +223,16 @@ function update-import-statements() { local owner=$2 local folder=./ local file_pattern="*.go" - local target="snivilised\/astrolib" + local target="snivilised\/arcadia" local replacement="$owner\/$repo" update-all-generic "update-import-statements" "$repo" "$owner" "$folder" "$file_pattern" "$target" "$replacement" } function rename-language-files() { local repo=$1 - find . -name 'astrolib*.json' -type f -print0 | + find . -name 'arcadia*.json' -type f -print0 | while IFS= read -r -d '' file; do - mv "$file" "$(dirname "$file")/$(basename "$file" | sed "s/^astrolib/$repo/")" + mv "$file" "$(dirname "$file")/$(basename "$file" | sed "s/^arcadia/$repo/")" done return $? }