@@ -787,7 +787,7 @@ function getSampleAppVersion() {
787787 try {
788788 yield exec . exec ( "bash" , [
789789 "-c" ,
790- "find ../robot_ws -name package.xml -exec grep -Po '(?<=<version>)[^\\s<>]*(?=</version>)' {} +"
790+ "find ../robot_ws -name package.xml -not -path ../robot_ws/src/deps/* - exec grep -Po '(?<=<version>)[^\\s<>]*(?=</version>)' {} +"
791791 ] , getWorkingDirExecOptions ( grepAfter ) ) ;
792792 version = grepAfter . stdout . trim ( ) ;
793793 }
@@ -829,6 +829,9 @@ function fetchRosinstallDependencies() {
829829function setup ( ) {
830830 return __awaiter ( this , void 0 , void 0 , function * ( ) {
831831 try {
832+ //this function relies on the fact that there is only 1 package.xml in ./robot_ws
833+ SAMPLE_APP_VERSION = yield getSampleAppVersion ( ) ;
834+ console . log ( `Sample App version found to be: ${ SAMPLE_APP_VERSION } ` ) ;
832835 if ( ! fs . existsSync ( "/etc/timezone" ) ) {
833836 //default to US Pacific if timezone is not set.
834837 const timezone = "US/Pacific" ;
@@ -840,8 +843,6 @@ function setup() {
840843 yield exec . exec ( "apt-get" , [ "update" ] ) ;
841844 //zip required for prepare_sources step.
842845 yield exec . exec ( "apt-get" , [ "install" , "-y" , "zip" ] ) ;
843- SAMPLE_APP_VERSION = yield getSampleAppVersion ( ) ;
844- console . log ( `Sample App version found to be: ${ SAMPLE_APP_VERSION } ` ) ;
845846 let packages = yield fetchRosinstallDependencies ( ) ;
846847 PACKAGES = packages . join ( " " ) ;
847848 }
0 commit comments