PromucFlow_constructor/deploy/docker/utils/bin/version.js
Sumesh Pradhan a1be1bf941
feat: appsmithctl version and mongo-eval utils (#19075)
`appsmithctl version` - Util to display current Appsmith version
`appsmithctl mongo-eval '<mongo query>' [--pretty]` - Util to run mongo
queries

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2023-01-03 12:14:21 +05:30

23 lines
440 B
JavaScript

const utils = require('./utils');
async function exec() {
let version = null;
try {
version = await utils.getCurrentAppsmithVersion();
} catch (err) {
console.error("Error fetching current Appsmith version", err);
process.exit(1);
}
if (version) {
console.log(version);
}
else {
console.error("Error: could not find the current Appsmith version")
process.exit(1);
}
}
module.exports = {
exec,
};