@@ -730,7 +730,6 @@ const ROS_DISTRO = core.getInput('ros-distro', { required: true });
730
730
let SAMPLE_APP_VERSION = '' ;
731
731
const WORKSPACE_DIRECTORY = core . getInput ( 'workspace-dir' ) ;
732
732
const GENERATE_SOURCES = core . getInput ( 'generate-sources' ) ;
733
- let PACKAGES = "none" ;
734
733
const ROS_ENV_VARIABLES = { } ;
735
734
const COLCON_BUNDLE_RETRIES = Number . parseInt ( core . getInput ( 'colcon-bundle-retries' ) , 10 ) ;
736
735
const MINIMUM_BACKOFF_TIME_SECONDS = 32 ; // delay for the first retry in seconds
@@ -797,11 +796,9 @@ function getSampleAppVersion() {
797
796
return Promise . resolve ( version ) ;
798
797
} ) ;
799
798
}
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'
801
800
function fetchRosinstallDependencies ( ) {
802
801
return __awaiter ( this , void 0 , void 0 , function * ( ) {
803
- let colconListAfter = { stdout : '' , stderr : '' } ;
804
- let packages = [ ] ;
805
802
// Download dependencies not in apt if .rosinstall exists
806
803
try {
807
804
// When generate-sources: true, the expected behavior is to include sources from both workspaces including their dependencies.
@@ -811,40 +808,29 @@ function fetchRosinstallDependencies() {
811
808
yield exec . exec ( "vcs" , [ "import" , "--input" , ".rosinstall" ] , { cwd : workspace } ) ;
812
809
}
813
810
}
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
- }
822
811
}
823
812
catch ( error ) {
824
813
core . setFailed ( error . message ) ;
825
814
}
826
- return Promise . resolve ( packages ) ;
827
815
} ) ;
828
816
}
829
817
function setup ( ) {
830
818
return __awaiter ( this , void 0 , void 0 , function * ( ) {
831
819
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 } ` ) ;
835
820
if ( ! fs . existsSync ( "/etc/timezone" ) ) {
836
821
//default to US Pacific if timezone is not set.
837
822
const timezone = "US/Pacific" ;
838
823
yield exec . exec ( "bash" , [ "-c" , `ln -snf /usr/share/zoneinfo/${ timezone } /etc/localtime` ] ) ;
839
824
yield exec . exec ( "bash" , [ "-c" , `echo ${ timezone } > /etc/timezone` ] ) ;
840
825
}
841
826
yield exec . exec ( "bash" , [ "-c" , `scripts/setup.sh --install-ros ${ ROS_DISTRO } ` ] ) ;
842
- loadROSEnvVariables ( ) ;
827
+ yield loadROSEnvVariables ( ) ;
843
828
yield exec . exec ( "apt-get" , [ "update" ] ) ;
844
829
//zip required for prepare_sources step.
845
830
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 ( ) ;
848
834
}
849
835
catch ( error ) {
850
836
core . setFailed ( error . message ) ;
0 commit comments