Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:undev-studio/cables_dev into dev…
Browse files Browse the repository at this point in the history
…elop
  • Loading branch information
pandrr committed Mar 7, 2024
2 parents 63a8695 + c7557e7 commit b9204c1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 40 deletions.
32 changes: 22 additions & 10 deletions hook_standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,50 @@ else
BUILD_OS=":$1";
fi

echo "building with node version `node --version`"
if [ -z "$BUILD_VERSION" ]; then
ARGS=""
else
ARGS="-- -c.buildVersion=$BUILD_VERSION -c.extraMetadata.version=$BUILD_VERSION";
fi

if [ -z "$NODE_EXE" ]; then NODE_EXE="node"; fi
if [ -z "$NPM_EXE" ]; then NPM_EXE="npm"; fi

NODE_DIR=$(dirname $(which $NPM_EXE))
export PATH="$NODE_DIR:$PATH"

echo "building with node version `$NODE_EXE --version`, args: $ARGS"

echo "INSTALLING cables_dev DEPENDENCIES"
npm install
$NPM_EXE install

echo "BUILDING shared"
cd shared
git pull
npm install
$NPM_EXE install
cd ..

echo "BUILDING cables"
cd cables
git pull
npm install
npm run build
$NPM_EXE install
$NPM_EXE run build
cd ..

echo "BUILDING cables_ui"
cd cables_ui
git pull
npm install
npm run build
$NPM_EXE install
$NPM_EXE run build
cd ..

echo "BUILDING cables_electron"
cd cables_electron
git pull
npm install
npm run build
$NPM_EXE install
$NPM_EXE run build
echo "PACKAGING cables_electron"
npm run dist$BUILD_OS
$NPM_EXE run dist$BUILD_OS $ARGS
cd ..

echo "DONE"
26 changes: 0 additions & 26 deletions shared/api/cables.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,6 @@ export default class Cables extends SharedUtil

this._config = this.getConfig();
this._createDirectories();

const packageJsonFile = path.join(this.getSourcePath(), "../package.json");
if (fs.existsSync(packageJsonFile))
{
const pjson = JSON.parse(fs.readFileSync(packageJsonFile));
if (pjson && pjson.engines && pjson.engines.node)
{
const wantedVersion = pjson.engines.node;
if (process && process.versions && process.versions.node)
{
const runningVersion = process.versions.node;
if (wantedVersion !== runningVersion)
{
this._log.error("NODE VERSION MISMATCH, WANTED", wantedVersion, "GOT", runningVersion);
}
}
else
{
this._log.warn("COULD NOT DETERMINE RUNNING NODE VERSION FROM process, WANTED VERSION IS", wantedVersion);
}
}
else
{
this._log.warn("COULD NOT DETERMINE WANTED NODE VERSION FROM package.json");
}
}
}

get utilName()
Expand Down
9 changes: 6 additions & 3 deletions shared/api/utils/shared_doc_util.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,11 @@ export default class SharedDocUtil extends SharedUtil
}
else
{
opDoc = this.getDocForOp(opName, this.cachedOpDocs.opDocs);
if (!opDoc) opDoc = this.buildOpDocs(opName);
if (this.cachedLookup)
{
opDoc = this.getDocForOp(opName, this.cachedOpDocs.opDocs);
if (!opDoc) opDoc = this.buildOpDocs(opName);
}
}
}
if (opDoc)
Expand Down Expand Up @@ -235,7 +238,7 @@ export default class SharedDocUtil extends SharedUtil
catch (e)
{
this._rebuildOpDocCache = true;
this._log.error("failed to rebuild opdoc cache", e);
this._log.warn("failed to rebuild opdoc cache", e);
}
}
else
Expand Down
3 changes: 2 additions & 1 deletion shared/api/utils/shared_ops_util.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import marked from "marked";
import uuidv4 from "uuid-v4";
import mkdirp from "mkdirp";
import sanitizeFileName from "sanitize-filename";
import eslintAirbnbBase from "eslint-config-airbnb-base";
import SharedUtil from "./shared_util.js";
import { UtilProvider } from "./util_provider.js";

Expand Down Expand Up @@ -1479,7 +1480,7 @@ export default class SharedOpsUtil extends SharedUtil
return {
"fix": true,
"baseConfig": {
"extends": ["airbnb-base"],
"extends": eslintAirbnbBase.extends,
},
"envs": ["browser"],
"useEslintrc": false,
Expand Down

0 comments on commit b9204c1

Please sign in to comment.