aboutsummaryrefslogtreecommitdiff
path: root/buildversion.js
diff options
context:
space:
mode:
authorRaindropsSys <raindrops@equestria.dev>2024-06-13 15:46:03 +0200
committerRaindropsSys <raindrops@equestria.dev>2024-06-13 15:46:03 +0200
commite44e2fe070484e06d384a31ef2699c3a2d5d474e (patch)
tree2d5eb5d1b01646270d18cf1f2d94519966d6e7de /buildversion.js
downloadfaunerie-e44e2fe070484e06d384a31ef2699c3a2d5d474e.tar.gz
faunerie-e44e2fe070484e06d384a31ef2699c3a2d5d474e.tar.bz2
faunerie-e44e2fe070484e06d384a31ef2699c3a2d5d474e.zip
GitHub migration
Diffstat (limited to 'buildversion.js')
-rwxr-xr-xbuildversion.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/buildversion.js b/buildversion.js
new file mode 100755
index 0000000..72b2d9d
--- /dev/null
+++ b/buildversion.js
@@ -0,0 +1,15 @@
+const isUpdater = !!process.argv[2];
+let baseVersion = "0.0.0";
+
+if (isUpdater) {
+ baseVersion = require('./updater/package.json')['version'];
+} else {
+ baseVersion = require('./package.json')['version'];
+}
+
+process.stdout.write(baseVersion + "-" + new Date().toISOString()
+ .replaceAll("-", "")
+ .replaceAll(":", "")
+ .split(".")[0]
+ .replace("T", ".")
+);