[skip ci] Add version to /vencord-debug

This commit is contained in:
V 2023-06-16 19:07:22 +02:00
parent 662c0227eb
commit eaeb60308e
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905
6 changed files with 32 additions and 22 deletions

View file

@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import "../suppressExperimentalWarnings.js";
import "../checkNodeVersion.js";
import { exec, execSync } from "child_process";
@ -24,6 +25,11 @@ import { readdir, readFile } from "fs/promises";
import { join, relative } from "path";
import { promisify } from "util";
// wtf is this assert syntax
import PackageJSON from "../../package.json" assert { type: "json" };
export const VERSION = PackageJSON.version;
export const BUILD_TIMESTAMP = Date.now();
export const watch = process.argv.includes("--watch");
export const isStandalone = JSON.stringify(process.argv.includes("--standalone"));
export const gitHash = execSync("git rev-parse --short HEAD", { encoding: "utf-8" }).trim();