Add migration helpers: migrate_module.sh and MIGRATION_CHECKLIST.md\n\nProvide a repeatable migration script and checklist to standardize adding modules (./Lts, ./...) for Qt6/C++20 migration.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
6ef0af4fd7
commit
9b15cee841
2 files changed
+73
No files matched your search
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# migration/migrate_module.sh
|
||||
# Usage: ./migration/migrate_module.sh <module-path> [--jobs N]
|
||||
# Runs a reproducible configure/build/test of the specified module inside the app docker
|
||||
|
||||
MODULE_PATH=${1:-}
|
||||
if [[ -z "$MODULE_PATH" ]]; then
|
||||
echo "Usage: $0 <module-path> [--jobs N]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
JOBS=4
|
||||
shift || true
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--jobs) JOBS="$2"; shift 2;;
|
||||
-j*) JOBS="${1#-j}"; shift;;
|
||||
*) echo "Unknown arg: $1"; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Ensure path is relative to repo root
|
||||
MODULE_ABS="/repo/$(realpath --relative-to=$(pwd) "$MODULE_PATH")"
|
||||
|
||||
# Use app/run_docker.sh to run the migration inside the prepared Qt6 image
|
||||
# The container will configure just the requested module in a clean build directory.
|
||||
|
||||
./app/run_docker.sh ../sandbox -- bash -lc "set -euo pipefail && export LD_LIBRARY_PATH=/opt/Qt/6.8.3/gcc_64/lib:\${LD_LIBRARY_PATH:-} && export QT_QPA_PLATFORM=offscreen && rm -rf /repo/build && mkdir -p /repo/build && cd /repo/build && \ cmake -S /repo -B /repo/build -G Ninja -DCMAKE_PREFIX_PATH=/opt/Qt/6.8.3/gcc_64 -DCMAKE_CXX_STANDARD=20 -DMIGRATE_MODULE=${MODULE_PATH} -DBUILD_TESTING=ON && \ cmake --build /repo/build -- -j${JOBS} && ctest --test-dir /repo/build --output-on-failure"
|
||||
|
||||
echo "Migration run for module ${MODULE_PATH} finished. Check ./build for logs and artifacts."
|
||||
Reference in new issue
Block a user