From 0972b56f54eb8bf03144115bbc6450c0c6f56277 Mon Sep 17 00:00:00 2001 From: sksat Date: Wed, 29 Nov 2023 14:02:30 +0900 Subject: [PATCH 1/2] fix v4.0.0 migration guide --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7abd65274..1aa286f4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -303,8 +303,8 @@ Rust エコシステム / C2A Boom の導入については,ArkEdge Space Inc. - [#138](https://github.com/arkedge/c2a-core/pull/138): C2A user の pytest のディレクトリ構成のリファクタ: [v4-rename-test-dir.sh](./script/migration/v4-rename-test-dir.sh) を実行 - [#154](https://github.com/arkedge/c2a-core/pull/154), [#155](https://github.com/arkedge/c2a-core/pull/155): [v4-rename-component-driver-prefix.sh](./script/migration/v4-rename-component-driver-prefix.sh) を実行 - [#165](https://github.com/arkedge/c2a-core/pull/165), [#166](https://github.com/arkedge/c2a-core/pull/166), [#169](https://github.com/arkedge/c2a-core/pull/169): [v4-rename-if-list.sh](./script/migration/v4-rename-if-list.sh) -- v4.0.0 - - [#167](https://github.com/arkedge/c2a-core/pull/167), [#168](https://github.com/arkedge/c2a-core/pull/168): `src/src_user/Settings` -> `src/src_user/settings` +- [v4.0.0](https://github.com/arkedge/c2a-core/releases/tag/v4.0.0) + - [#167](https://github.com/arkedge/c2a-core/pull/167), [#168](https://github.com/arkedge/c2a-core/pull/168): `src/src_user/Settings` -> `src/src_user/settings`: [v4-rename-settings.sh](./script/migration/v4-rename-settings.sh) を実行 - [#172](https://github.com/arkedge/c2a-core/pull/172): `src/src_user/settings/tlm_cmd/data_base` -> `tlm-cmd-db` の rename を実行([v4-move-db-dir.sh](script/migration/v4-move-db-dir.sh)) From ba22ce27e440a2628c9d96468eb58a41182e9191 Mon Sep 17 00:00:00 2001 From: sksat Date: Wed, 29 Nov 2023 14:04:17 +0900 Subject: [PATCH 2/2] update v4.0.0 rename settings migration script from feedback --- script/migration/v4-rename-settings.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/script/migration/v4-rename-settings.sh b/script/migration/v4-rename-settings.sh index b0460741e..170ab4a0c 100755 --- a/script/migration/v4-rename-settings.sh +++ b/script/migration/v4-rename-settings.sh @@ -27,6 +27,7 @@ for ((i=0; i<${#tl_org[@]}; i++)); do sed -i -e "s#modes/task_lists/${tl_org[i]}#modes/task_lists/${tl_new[i]}#g" src/src_user/settings/CMakeLists.txt find_all | xargs -0 sed -i -e "s#Settings/Modes/TaskLists/${tl_org[i]}#settings/modes/task_lists/${tl_new[i]}#g" + find_all | xargs -0 sed -i -e "s#Settings\\\Modes\\\TaskLists\\\\${tl_org[i]}#settings\\\modes\\\task_lists\\\\${tl_new[i]}#g" if [ -e src/src_user/settings/modes/task_lists/${tl_org[i]} ]; then mv src/src_user/settings/modes/task_lists/${tl_org[i]} src/src_user/settings/modes/task_lists/${tl_new[i]} @@ -34,6 +35,7 @@ for ((i=0; i<${#tl_org[@]}; i++)); do done find_all | xargs -0 sed -i -e "s#Settings/Modes/TaskLists#settings/modes/task_lists#g" +find_all | xargs -0 sed -i -e "s#Settings\\\Modes\\\TaskLists#settings\\\modes\\\task_lists#g" echo " /modes/Transitions -> transitions" @@ -45,18 +47,27 @@ mv src/src_user/settings/modes/Transitions src/src_user/settings/modes/transitio for ((i=0; i<${#tr_org[@]}; i++)); do echo " /transitions/${tr_org[i]} -> ${tr_new[i]}" + sed -i -e "s#modes/transitions/${tr_org[i]}#modes/transitions/${tr_new[i]}#g" src/src_user/settings/CMakeLists.txt + find_all | xargs -0 sed -i -e "s#Settings/Modes/Transitions/${tr_org[i]}#settings/modes/transitions/${tr_new[i]}#g" + find_all | xargs -0 sed -i -e "s#Settings\\\Modes\\\Transitions\\\\${tr_org[i]}#settings\\\modes\\\transitions\\\\${tr_new[i]}#g" if [ -e src/src_user/settings/modes/transitions/${tr_org[i]} ]; then mv src/src_user/settings/modes/transitions/${tr_org[i]} src/src_user/settings/modes/transitions/${tr_new[i]} fi done find_all | xargs -0 sed -i -e "s#Settings/Modes/Transitions#settings/modes/transitions#g" +find_all | xargs -0 sed -i -e "s#Settings\\\Modes\\\Transitions#settings\\\modes\\\transitions#g" # ref find_all | xargs -0 sed -i -e "s#Settings/Modes#settings/modes#g" +find_all | xargs -0 sed -i -e "s#Settings\\\Modes#settings\\\modes#g" + find_all | xargs -0 sed -i -e "s#Settings/AnomalyHandlerRules#settings/anomaly_handler_rules#g" +find_all | xargs -0 sed -i -e "s#Settings\\\AnomalyHandlerRules#settings\\\anomaly_handler_rules#g" + find_all | xargs -0 sed -i -e "s#Settings/AnomalyLogger#settings/anomaly_logger#g" +find_all | xargs -0 sed -i -e "s#Settings\\\AnomalyLogger#settings\\\anomaly_logger#g" find_all | xargs -0 sed -i -e "s#Settings/ComponentDriverSuper#settings/component_driver_super#g" find_all | xargs -0 sed -i -e "s#Settings\\\ComponentDriverSuper#settings\\\component_driver_super#g"