Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

UI updates: Fix model build task

Rich Turner8f9ae6cac64b
diff --git a/ui/util/cli.js b/ui/util/cli.js
index 08b14cb60..cbb0bd293 100755
--- a/ui/util/cli.js
+++ b/ui/util/cli.js
@@ -6,7 +6,7 @@ const { spawn } = require("child_process");
/* THIS IS JUST A WRAPPER THAT LAUNCHES GRADLE TASKS */
-/* Try and get the gradle root project dir this could be the openremote repo or a custom project */
+/* Try and get the gradle openremote project dir */
function getWorkingDirectory() {
let dirs = __dirname.split(path.sep);
dirs.pop();
@@ -15,16 +15,6 @@ function getWorkingDirectory() {
let cwd = dirs.join(path.sep);
cwd = path.join(cwd, "..");
- try {
- if (fs.existsSync(path.join(cwd, "..", ".gitmodules"))) {
- // Go up a level to custom project
- cwd = path.join(cwd, "..");
- }
- } catch(err) {
- console.error(err);
- process.exit(1);
- }
-
return cwd;
}
@@ -50,7 +40,7 @@ if (process.argv.length >= 3 && process.argv[2] =="watch") {
// Do build
let cwd = getWorkingDirectory();
- console.log("Running gradlew modelBuild task...");
+ console.log("Running gradlew modelBuild task in " + cwd + " ...");
const gradleModelWatch = spawnSync((process.platform === "win32" ? "gradlew" : "./gradlew"), ["modelWatch"], {
cwd: cwd,
shell: true