Skip to content

Commit

Permalink
Add type support regeneration utility to 1.2.x (#170)
Browse files Browse the repository at this point in the history
* Add type support regeneration utility (#108)

* Refs #20677: Add type support regeneration utility

Signed-off-by: EduPonz <[email protected]>

* Refs #20677: Remove legacy script

Signed-off-by: EduPonz <[email protected]>

* Refs #20677: Apply suggestions

Signed-off-by: EduPonz <[email protected]>

---------

Signed-off-by: EduPonz <[email protected]>

* Hotfix: type regeneration script (#115)

* Refs #20734: fix type regeneration script

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

* Refs #20734: regenerate types using script

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

---------

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

* Refs #21226: Adjust script to python version 1.2.x

Signed-off-by: JesusPoderoso <[email protected]>

---------

Signed-off-by: EduPonz <[email protected]>
Signed-off-by: JLBuenoLopez-eProsima <[email protected]>
Signed-off-by: JesusPoderoso <[email protected]>
Co-authored-by: Eduardo Ponz Segrelles <[email protected]>
Co-authored-by: José Luis Bueno López <[email protected]>
  • Loading branch information
3 people authored Jul 22, 2024
1 parent 1c3018d commit 8057dd0
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions utils/scripts/update_generated_code_from_idl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env bash

red='\E[1;31m'
yellow='\E[1;33m'
textreset='\E[1;0m'

current_dir=$(git rev-parse --show-toplevel)

if [[ ! "$(pwd -P)" -ef "${current_dir}" ]]; then
echo -e "${red}This script must be executed in the repository root directory.${textreset}"
exit -1
fi

if [[ -z "$(which fastddsgen)" ]]; then
echo "Cannot find fastddsgen. Please, include it in PATH environment variable"
exit -1
fi

ret_value=0

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

if [[ $ret_value != -1 ]]; then
cd "./fastdds_python_examples/HelloWorldExample"

echo -e "Processing ${yellow}HelloWorld.idl${textreset}"
echo "Running: fastddsgen -replace -python HelloWorld.idl"
fastddsgen -replace -python HelloWorld.idl
fi

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

exit ${ret_value}

0 comments on commit 8057dd0

Please sign in to comment.