Skip to content

Commit 6d3e278

Browse files
cheng-kevinchengke
andauthored
commit index.js (#33)
Co-authored-by: chengke <[email protected]>
1 parent 0b7949b commit 6d3e278

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

robomaker-sample-app-ci/dist/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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() {
829829
function 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

Comments
 (0)