NevermoreCLIManifestUtils
Reads deploy metadata baked into the running place by the nevermore CLI at deploy time.
When a place is deployed via nevermore deploy, the CLI locates this
ModuleScript in the built place and writes the deployment metadata (commit,
target, timestamp, etc.) as attributes onto it. Because the data lives on
the package's own instance it travels with the package and replicates to
clients automatically -- consumers like GameConfig, GameVersionUtils or
PlayerMetrics can simply require("NevermoreCLIManifestUtils") and call
NevermoreCLIManifestUtils.getGameMetadata.
When running in Studio, or in a place that was never deployed through the CLI, no attributes are present and NevermoreCLIManifestUtils.isDeployed returns false.
local metadata = NevermoreCLIManifestUtils.getGameMetadata()
if metadata.deployed then
print(string.format("Running %s @ %s (%s)", metadata.target, metadata.commit, metadata.timestamp))
else
print("Running an undeployed build (Studio)")
end
Types
GameMetadata
interface GameMetadata {deployed: boolean--
true only when injected by a nevermore deploy
commit: string?--
short git commit SHA the build was made from
version: string?--
full git commit SHA the build was made from
branch: string?--
git branch the build was made from
target: string?--
deploy target name (e.g. "test", "integration")
timestamp: string?--
ISO 8601 UTC timestamp of when the deploy ran
published: boolean?--
true if published live (--publish), false if only Saved
placeId: number?--
Roblox place ID the build was deployed to
universeId: number?--
Roblox universe ID the build was deployed to
}
Metadata describing how and when the running place was deployed. Every field
other than deployed is optional -- older CLI versions may not populate all
of them, and none are present in an undeployed build.
Functions
getGameMetadata
Returns a snapshot of the deploy metadata for the running place.
Safe to call on both the client and the server. On the client the metadata replicates with the package, so it is available as soon as the package has replicated. Use NevermoreCLIManifestUtils.observeGameMetadata if you need to react to it becoming available.
instance defaults to the manifest module itself (where the CLI injects the
data); pass an instance to parse metadata attributes off somewhere else.
isDeployed
Returns true if the running place was deployed through nevermore deploy.
Returns false in Studio and in any place that was never deployed via the CLI.
observeGameMetadata
Observes the deploy metadata, firing immediately with the current snapshot and again whenever any field changes (for example when the metadata first replicates to a client).