Skip to content

Commit

Permalink
Fix version.json embed
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Jan 23, 2024
1 parent dc656af commit 9045391
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion base/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,14 @@ if (flags.voxels) {
let export_version_info = true;
if (export_version_info) {
const fs = require("fs");
let dir = "../" + flags.name.toLowerCase() + "/build/krom/data";
let dir = "../" + flags.name.toLowerCase() + "/build";
let sha = require("child_process").execSync(`git log --pretty=format:"%h" -n 1`).toString().substr(1, 7);
let date = new Date().toISOString().split("T")[0];
let data = `{ "sha": "${sha}", "date": "${date}" }`;
fs.ensureDirSync(dir);
fs.writeFileSync(dir + "/version.json", data);
// Adds version.json to embed.txt list
project.addAssets(dir + "/version.json", { destination: "data/{name}", embed: flags.snapshot });
}

resolve(project);

0 comments on commit 9045391

Please sign in to comment.