This will bring us one step closer to the `info.json` being the one source of truth for the version information. We shouldn't need the step to overwrite the contents of the `version.js` file during build in CI.
9 lines
185 B
JavaScript
9 lines
185 B
JavaScript
import * as fs from "fs";
|
|
|
|
export const VERSION =
|
|
(() => {
|
|
try {
|
|
return JSON.parse(fs.readFileSync("/opt/appsmith/info.json")).version;
|
|
} catch {}
|
|
})() || "SNAPSHOT";
|