@@ -730,7 +730,6 @@ const ROS_DISTRO = core.getInput('ros-distro', { required: true });
730730let SAMPLE_APP_VERSION = '' ;
731731const WORKSPACE_DIRECTORY = core . getInput ( 'workspace-dir' ) ;
732732const GENERATE_SOURCES = core . getInput ( 'generate-sources' ) ;
733- let PACKAGES = "none" ;
734733const ROS_ENV_VARIABLES = { } ;
735734const COLCON_BUNDLE_RETRIES = Number . parseInt ( core . getInput ( 'colcon-bundle-retries' ) , 10 ) ;
736735const MINIMUM_BACKOFF_TIME_SECONDS = 32 ; // delay for the first retry in seconds
@@ -797,11 +796,9 @@ function getSampleAppVersion() {
797796 return Promise . resolve ( version ) ;
798797 } ) ;
799798}
800- // If .rosinstall exists, run 'vcs import' and return a list of names of the packages that were added in both workspaces.
799+ // If .rosinstall exists, run 'vcs import'
801800function fetchRosinstallDependencies ( ) {
802801 return __awaiter ( this , void 0 , void 0 , function * ( ) {
803- let colconListAfter = { stdout : '' , stderr : '' } ;
804- let packages = [ ] ;
805802 // Download dependencies not in apt if .rosinstall exists
806803 try {
807804 // When generate-sources: true, the expected behavior is to include sources from both workspaces including their dependencies.
@@ -811,40 +808,29 @@ function fetchRosinstallDependencies() {
811808 yield exec . exec ( "vcs" , [ "import" , "--input" , ".rosinstall" ] , { cwd : workspace } ) ;
812809 }
813810 }
814- // this is outside the loop as we don't want to build both the dependency packages
815- if ( fs . existsSync ( path . join ( WORKSPACE_DIRECTORY , '.rosinstall' ) ) ) {
816- yield exec . exec ( "colcon" , [ "list" , "--names-only" ] , getWorkingDirExecOptions ( colconListAfter ) ) ;
817- const packagesAfter = colconListAfter . stdout . split ( "\n" ) ;
818- packagesAfter . forEach ( packageName => {
819- packages . push ( packageName . trim ( ) ) ;
820- } ) ;
821- }
822811 }
823812 catch ( error ) {
824813 core . setFailed ( error . message ) ;
825814 }
826- return Promise . resolve ( packages ) ;
827815 } ) ;
828816}
829817function setup ( ) {
830818 return __awaiter ( this , void 0 , void 0 , function * ( ) {
831819 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 } ` ) ;
835820 if ( ! fs . existsSync ( "/etc/timezone" ) ) {
836821 //default to US Pacific if timezone is not set.
837822 const timezone = "US/Pacific" ;
838823 yield exec . exec ( "bash" , [ "-c" , `ln -snf /usr/share/zoneinfo/${ timezone } /etc/localtime` ] ) ;
839824 yield exec . exec ( "bash" , [ "-c" , `echo ${ timezone } > /etc/timezone` ] ) ;
840825 }
841826 yield exec . exec ( "bash" , [ "-c" , `scripts/setup.sh --install-ros ${ ROS_DISTRO } ` ] ) ;
842- loadROSEnvVariables ( ) ;
827+ yield loadROSEnvVariables ( ) ;
843828 yield exec . exec ( "apt-get" , [ "update" ] ) ;
844829 //zip required for prepare_sources step.
845830 yield exec . exec ( "apt-get" , [ "install" , "-y" , "zip" ] ) ;
846- let packages = yield fetchRosinstallDependencies ( ) ;
847- PACKAGES = packages . join ( " " ) ;
831+ SAMPLE_APP_VERSION = yield getSampleAppVersion ( ) ;
832+ console . log ( `Sample App version found to be: ${ SAMPLE_APP_VERSION } ` ) ;
833+ yield fetchRosinstallDependencies ( ) ;
848834 }
849835 catch ( error ) {
850836 core . setFailed ( error . message ) ;
0 commit comments