From 6d3e2784649b57cf16b596a157188da3739e5fc5 Mon Sep 17 00:00:00 2001 From: Kevin Cheng <9795673+cheng-kevin@users.noreply.github.com> Date: Fri, 18 Jun 2021 11:45:00 -0700 Subject: [PATCH] commit index.js (#33) Co-authored-by: chengke --- robomaker-sample-app-ci/dist/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/robomaker-sample-app-ci/dist/index.js b/robomaker-sample-app-ci/dist/index.js index 8cc1950..8af4afd 100644 --- a/robomaker-sample-app-ci/dist/index.js +++ b/robomaker-sample-app-ci/dist/index.js @@ -787,7 +787,7 @@ function getSampleAppVersion() { try { yield exec.exec("bash", [ "-c", - "find ../robot_ws -name package.xml -exec grep -Po '(?<=)[^\\s<>]*(?=)' {} +" + "find ../robot_ws -name package.xml -not -path ../robot_ws/src/deps/* -exec grep -Po '(?<=)[^\\s<>]*(?=)' {} +" ], getWorkingDirExecOptions(grepAfter)); version = grepAfter.stdout.trim(); } @@ -829,6 +829,9 @@ function fetchRosinstallDependencies() { function setup() { return __awaiter(this, void 0, void 0, function* () { try { + //this function relies on the fact that there is only 1 package.xml in ./robot_ws + SAMPLE_APP_VERSION = yield getSampleAppVersion(); + console.log(`Sample App version found to be: ${SAMPLE_APP_VERSION}`); if (!fs.existsSync("/etc/timezone")) { //default to US Pacific if timezone is not set. const timezone = "US/Pacific"; @@ -840,8 +843,6 @@ function setup() { yield exec.exec("apt-get", ["update"]); //zip required for prepare_sources step. yield exec.exec("apt-get", ["install", "-y", "zip"]); - SAMPLE_APP_VERSION = yield getSampleAppVersion(); - console.log(`Sample App version found to be: ${SAMPLE_APP_VERSION}`); let packages = yield fetchRosinstallDependencies(); PACKAGES = packages.join(" "); }