move server into apps/ignis-server

This commit is contained in:
Nystik
2026-05-21 17:26:08 +02:00
parent a6807fe850
commit 8672fa11a3
65 changed files with 19 additions and 10 deletions

View File

@@ -0,0 +1,23 @@
const fs = require("fs");
const path = require("path");
const { execSync } = require("child_process");
function getVersion() {
const pkg = JSON.parse(
fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf-8"),
);
const semver = pkg.version;
let hash;
try {
hash = execSync("git rev-parse --short=7 HEAD", {
encoding: "utf-8",
}).trim();
} catch (e) {
hash = Date.now().toString(36).slice(-7);
}
return `${semver}-${hash}`;
}
module.exports = { getVersion };