mirror of
https://github.com/wassname/talk.git
synced 2026-08-16 11:29:31 +08:00
[next] Docker + Revision Metadata (#1991)
* feat: added version metadata, release to Docker * fix: fixed mistake with export * fix: adjusted circle cache beheviour * fix: removed node_modules from workspace * fix: added version prefix to cache keys * review: patched invalid job name * fix: hardcode cache version prefix :( * fix: improved cache keys
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
export let revision: string = "";
|
||||
export let version: string = "";
|
||||
|
||||
// Pull the version information from the package.json file.
|
||||
const packagePath = path.join(__dirname, "..", "..", "..", "package.json");
|
||||
({ version } = JSON.parse(fs.readFileSync(packagePath, "utf8")));
|
||||
|
||||
// Try to get the revision from the revision file. This file is generated by the
|
||||
// Docker build.
|
||||
const revisionPath = path.join(__dirname, "__generated__", "revision.json");
|
||||
if (fs.existsSync(revisionPath)) {
|
||||
({ revision } = JSON.parse(fs.readFileSync(revisionPath, "utf8")));
|
||||
}
|
||||
Reference in New Issue
Block a user