mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 12:57:46 +00:00
Add GitHub Runner Image Version to turbo-cache-key.json (#10887)
Add GitHub Runner Image Version to turbo-cache-key.json
This commit is contained in:
10
utils/gen.js
vendored
10
utils/gen.js
vendored
@@ -7,9 +7,15 @@
|
|||||||
const { writeFileSync } = require('fs');
|
const { writeFileSync } = require('fs');
|
||||||
const { join } = require('path');
|
const { join } = require('path');
|
||||||
|
|
||||||
const { versions, platform, arch } = process;
|
const { versions, platform, arch, env } = process;
|
||||||
const file = join(__dirname, '..', 'turbo-cache-key.json');
|
const file = join(__dirname, '..', 'turbo-cache-key.json');
|
||||||
const node = versions.node.split('.')[0];
|
const node = versions.node.split('.')[0];
|
||||||
const str = JSON.stringify({ node, platform, arch });
|
const str = JSON.stringify({
|
||||||
|
node,
|
||||||
|
platform,
|
||||||
|
arch,
|
||||||
|
// the GitHub runner image version (example: "20231126.1.1")
|
||||||
|
imageVersion: env.ImageVersion ?? 'local',
|
||||||
|
});
|
||||||
console.log(`Generating cache key: ${str}`);
|
console.log(`Generating cache key: ${str}`);
|
||||||
writeFileSync(file, str);
|
writeFileSync(file, str);
|
||||||
|
|||||||
Reference in New Issue
Block a user