Skip to content

Commit

Permalink
commit index.js (#33)
Browse files Browse the repository at this point in the history
Co-authored-by: chengke <chengke@uefee1b00be3a55.ant.amazon.com>
  • Loading branch information
cheng-kevin and chengke committed Jun 18, 2021
1 parent 0b7949b commit 6d3e278
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions robomaker-sample-app-ci/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ function getSampleAppVersion() {
try {
yield exec.exec("bash", [
"-c",
"find ../robot_ws -name package.xml -exec grep -Po '(?<=<version>)[^\\s<>]*(?=</version>)' {} +"
"find ../robot_ws -name package.xml -not -path ../robot_ws/src/deps/* -exec grep -Po '(?<=<version>)[^\\s<>]*(?=</version>)' {} +"
], getWorkingDirExecOptions(grepAfter));
version = grepAfter.stdout.trim();
}
Expand Down Expand Up @@ -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";
Expand All @@ -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(" ");
}
Expand Down

0 comments on commit 6d3e278

Please sign in to comment.