@@ -787,7 +787,7 @@ function getSampleAppVersion() {
787
787
try {
788
788
yield exec . exec ( "bash" , [
789
789
"-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>)' {} +"
791
791
] , getWorkingDirExecOptions ( grepAfter ) ) ;
792
792
version = grepAfter . stdout . trim ( ) ;
793
793
}
@@ -829,6 +829,9 @@ function fetchRosinstallDependencies() {
829
829
function setup ( ) {
830
830
return __awaiter ( this , void 0 , void 0 , function * ( ) {
831
831
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 } ` ) ;
832
835
if ( ! fs . existsSync ( "/etc/timezone" ) ) {
833
836
//default to US Pacific if timezone is not set.
834
837
const timezone = "US/Pacific" ;
@@ -840,8 +843,6 @@ function setup() {
840
843
yield exec . exec ( "apt-get" , [ "update" ] ) ;
841
844
//zip required for prepare_sources step.
842
845
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 } ` ) ;
845
846
let packages = yield fetchRosinstallDependencies ( ) ;
846
847
PACKAGES = packages . join ( " " ) ;
847
848
}
0 commit comments