@quenty/gameversionutils
v3.9.1
Published
Utility functions to automatically detect the version a game is running at
Readme
GameVersionUtils
Utility functions to automatically detect the version a game is running at
Installation
npm install @quenty/gameversionutils --saveUsage
getVersionString() formats the place version together with the deploy metadata the nevermore CLI bakes in (see @quenty/nevermoreclimanifest), so every diagnostic surface reports a build the same way.
local GameVersionUtils = require("GameVersionUtils")
print(GameVersionUtils.getVersionString())
--> 1.0.0 · integration · a4a79e8 · v312 (deployed from main)
--> 1.0.0 · integration · users/quenty/thing · a4a79e8 · v312 (deployed from a branch)
--> studio (never deployed)
--> undeployed · v312 (published outside the CLI)Fields the CLI did not stamp are dropped rather than printed as placeholders, and the branch is only shown when a build came from something other than main/master.
Use observeVersionString() for anything displayed at boot — on the client the metadata arrives with replication. getEnvironmentName() returns just the deploy target ("integration", "production-demo"), or nil when the place was not deployed through the CLI.
