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

[20734] Hotfix: type regeneration script #115

Merged
merged 2 commits into from
Apr 3, 2024
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
2 changes: 1 addition & 1 deletion fastdds_python_examples/HelloWorldExample/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.16.3)
cmake_minimum_required(VERSION 3.22)

# SWIG: use standard target name.
if(POLICY CMP0078)
Expand Down
39 changes: 18 additions & 21 deletions utils/scripts/update_generated_code_from_idl.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
#!/usr/bin/env bash

idl_files=(
'./fastdds_python/test/types/test_modules.idl'
'./fastdds_python/test/types/test_complete.idl'
'./fastdds_python/test/types/test_included_modules.idl'
'./fastdds_python_examples/HelloWorldExample/HelloWorld.idl'
)

red='\E[1;31m'
yellow='\E[1;33m'
textreset='\E[1;0m'
Expand All @@ -25,22 +18,26 @@ fi

ret_value=0

for idl_file in "${idl_files[@]}"; do
idl_dir=$(dirname "${idl_file}")
file_from_gen=$(basename "${idl_file}")

echo -e "Processing ${yellow}${idl_file}${textreset}"

cd "${idl_dir}"
cd ./fastdds_python/test/types
echo -e "Processing ${yellow}test_complete.idl test_modules.idl${textreset}"
echo "Running: fastddsgen -cdr both -replace -python test_complete.idl test_modules.idl"
fastddsgen -cdr both -replace -python test_complete.idl test_modules.idl
if [[ $? != 0 ]]; then
ret_value=-1
fi
cd -

echo "Running: fastddsgen -cdr both -replace -flat-output-dir -python ${file_from_gen}"
fastddsgen -cdr both -replace -flat-output-dir -python ${file_from_gen}
if [[ $ret_value != -1 ]]; then
cd "./fastdds_python_examples/HelloWorldExample"

if [[ $? != 0 ]]; then
ret_value=-1
fi
echo -e "Processing ${yellow}HelloWorld.idl${textreset}"
echo "Running: fastddsgen -cdr both -replace -python HelloWorld.idl"
fastddsgen -cdr both -replace -python HelloWorld.idl
fi

cd -
done
if [[ $? != 0 ]]; then
ret_value=-1
fi
cd -

exit ${ret_value}