Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback from v4.0.0 migration #224

Merged
merged 2 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))


Expand Down
11 changes: 11 additions & 0 deletions script/migration/v4-rename-settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ 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]}
fi

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"
Expand All @@ -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"
Expand Down
Loading